Index: content/browser/devtools/protocol/page_handler.h |
diff --git a/content/browser/devtools/protocol/page_handler.h b/content/browser/devtools/protocol/page_handler.h |
index d6eb3a556b990a4f24b599c62f1a53aa34c6d326..a91cbd8ae307295967d4e5e277244d15a8c5a266 100644 |
--- a/content/browser/devtools/protocol/page_handler.h |
+++ b/content/browser/devtools/protocol/page_handler.h |
@@ -21,10 +21,13 @@ class SkBitmap; |
namespace content { |
+class NavigationHandle; |
class RenderFrameHostImpl; |
class WebContentsImpl; |
namespace devtools { |
+class PageNavigationThrottle; |
+ |
namespace page { |
class ColorPicker; |
@@ -79,6 +82,17 @@ class PageHandler : public NotificationObserver { |
Response SetColorPickerEnabled(bool enabled); |
Response RequestAppBanner(); |
+ Response SetNavigationThrottleEnabled(bool enabled); |
+ Response NavigationThrottleResponse(const std::string& response, |
+ int navigation_id); |
+ |
+ std::unique_ptr<PageNavigationThrottle> GetThrottleForNavigation( |
+ NavigationHandle* navigation_handle); |
+ |
+ void OnPageNavigationThrottleDisposed(int navigation_id); |
+ void ShouldAllowNavigation(const PageNavigationThrottle* throttle); |
+ void ShouldAllowRedirect(const PageNavigationThrottle* throttle); |
+ |
private: |
WebContentsImpl* GetWebContents(); |
void NotifyScreencastVisibility(bool visible); |
@@ -120,6 +134,10 @@ class PageHandler : public NotificationObserver { |
std::unique_ptr<ColorPicker> color_picker_; |
+ bool navigation_throttle_enabled_; |
+ int next_navigation_id_; |
+ std::map<int, PageNavigationThrottle*> navigation_throttles_; |
+ |
RenderFrameHostImpl* host_; |
std::unique_ptr<Client> client_; |
NotificationRegistrar registrar_; |