Index: content/browser/frame_host/navigation_handle_impl.h |
diff --git a/content/browser/frame_host/navigation_handle_impl.h b/content/browser/frame_host/navigation_handle_impl.h |
index 853c2fbd2ff85b0f3492ef653388c133ce030fa7..bd536c5a50fda144fb133550f211478abd9d08d6 100644 |
--- a/content/browser/frame_host/navigation_handle_impl.h |
+++ b/content/browser/frame_host/navigation_handle_impl.h |
@@ -92,7 +92,8 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
bool is_same_page, |
const base::TimeTicks& navigation_start, |
int pending_nav_entry_id, |
- bool started_from_context_menu); |
+ bool started_from_context_menu, |
+ bool should_bypass_main_world_csp); |
~NavigationHandleImpl() override; |
// Used to track the state the navigation is currently in. |
@@ -351,6 +352,10 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
complete_callback_for_testing_ = callback; |
} |
+ bool should_bypass_main_world_csp() const { |
+ return should_bypass_main_world_csp_; |
+ } |
+ |
private: |
friend class NavigationHandleImplTest; |
@@ -361,7 +366,8 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
bool is_same_page, |
const base::TimeTicks& navigation_start, |
int pending_nav_entry_id, |
- bool started_from_context_menu); |
+ bool started_from_context_menu, |
+ bool should_bypass_main_world_csp); |
NavigationThrottle::ThrottleCheckResult CheckWillStartRequest(); |
NavigationThrottle::ThrottleCheckResult CheckWillRedirectRequest(); |
@@ -515,6 +521,11 @@ class CONTENT_EXPORT NavigationHandleImpl : public NavigationHandle { |
net::HostPortPair socket_address_; |
NavigationType navigation_type_; |
+ // Whether or not the navigation has been issued by an isolated world, for |
+ // instance from a chrome extension. When true, the navigation should not be |
+ // blocked by the parent frame's CSP. |
+ bool should_bypass_main_world_csp_; |
+ |
base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; |
DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); |