summaryrefslogtreecommitdiff
path: root/chromium/content/public
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/content/public')
-rw-r--r--chromium/content/public/browser/content_browser_client.cc7
-rw-r--r--chromium/content/public/browser/content_browser_client.h7
-rw-r--r--chromium/content/public/common/content_features.cc10
-rw-r--r--chromium/content/public/common/content_features.h2
4 files changed, 26 insertions, 0 deletions
diff --git a/chromium/content/public/browser/content_browser_client.cc b/chromium/content/public/browser/content_browser_client.cc
index 6a264c4692f..70cc5e2e8de 100644
--- a/chromium/content/public/browser/content_browser_client.cc
+++ b/chromium/content/public/browser/content_browser_client.cc
@@ -78,6 +78,13 @@ bool ContentBrowserClient::ShouldLockToOrigin(BrowserContext* browser_context,
return true;
}
+bool ContentBrowserClient::ShouldBypassDocumentBlocking(
+ const url::Origin& initiator,
+ const GURL& url,
+ ResourceType resource_type) {
+ return false;
+}
+
void ContentBrowserClient::GetAdditionalViewSourceSchemes(
std::vector<std::string>* additional_schemes) {
GetAdditionalWebUISchemes(additional_schemes);
diff --git a/chromium/content/public/browser/content_browser_client.h b/chromium/content/public/browser/content_browser_client.h
index 856fb806707..61c108c53b9 100644
--- a/chromium/content/public/browser/content_browser_client.h
+++ b/chromium/content/public/browser/content_browser_client.h
@@ -239,6 +239,13 @@ class CONTENT_EXPORT ContentBrowserClient {
virtual bool ShouldLockToOrigin(BrowserContext* browser_context,
const GURL& effective_url);
+ // Returns true if the |initiator| origin should be allowed to receive a
+ // document at |url|, bypassing the usual blocking logic. Defaults to false.
+ // This is called on the IO thread.
+ virtual bool ShouldBypassDocumentBlocking(const url::Origin& initiator,
+ const GURL& url,
+ ResourceType resource_type);
+
// Returns a list additional WebUI schemes, if any. These additional schemes
// act as aliases to the chrome: scheme. The additional schemes may or may
// not serve specific WebUI pages depending on the particular URLDataSource
diff --git a/chromium/content/public/common/content_features.cc b/chromium/content/public/common/content_features.cc
index 2b88e0c7a99..f11d51a320c 100644
--- a/chromium/content/public/common/content_features.cc
+++ b/chromium/content/public/common/content_features.cc
@@ -90,6 +90,16 @@ const base::Feature kCompositorImageAnimation{
const base::Feature kCompositorTouchAction{"CompositorTouchAction",
base::FEATURE_DISABLED_BY_DEFAULT};
+// Enables blocking cross-site document responses (not paying attention to
+// whether a site isolation mode is also enabled).
+const base::Feature kCrossSiteDocumentBlockingAlways{
+ "CrossSiteDocumentBlockingAlways", base::FEATURE_DISABLED_BY_DEFAULT};
+
+// Enables blocking cross-site document responses if one of site isolation modes
+// is (e.g. site-per-process or isolate-origins) is enabled.
+const base::Feature kCrossSiteDocumentBlockingIfIsolating{
+ "CrossSiteDocumentBlockingIfIsolating", base::FEATURE_ENABLED_BY_DEFAULT};
+
// Throttle tasks in Blink background timer queues based on CPU budgets
// for the background tab. Bug: https://crbug.com/639852.
const base::Feature kExpensiveBackgroundTimerThrottling{
diff --git a/chromium/content/public/common/content_features.h b/chromium/content/public/common/content_features.h
index 470b6607c3a..a72f19f4a06 100644
--- a/chromium/content/public/common/content_features.h
+++ b/chromium/content/public/common/content_features.h
@@ -32,6 +32,8 @@ CONTENT_EXPORT extern const base::Feature kCompositeOpaqueFixedPosition;
CONTENT_EXPORT extern const base::Feature kCompositeOpaqueScrollers;
CONTENT_EXPORT extern const base::Feature kCompositorImageAnimation;
CONTENT_EXPORT extern const base::Feature kCompositorTouchAction;
+CONTENT_EXPORT extern const base::Feature kCrossSiteDocumentBlockingAlways;
+CONTENT_EXPORT extern const base::Feature kCrossSiteDocumentBlockingIfIsolating;
CONTENT_EXPORT extern const base::Feature kExpensiveBackgroundTimerThrottling;
CONTENT_EXPORT extern const base::Feature kFeaturePolicy;
CONTENT_EXPORT extern const base::Feature kFetchKeepaliveTimeoutSetting;