Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(767)

Unified Diff: content/browser/devtools/protocol/page_handler.h

Issue 2132673002: Adding Navigation Throttles to DevTools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed frameID Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d39c6cf3c937fa198bce6715c35059521749c3c2 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,16 @@ class PageHandler : public NotificationObserver {
Response SetColorPickerEnabled(bool enabled);
Response RequestAppBanner();
+ Response SetNavigationThrottleEnabled(bool enabled);
+ Response ProcessNavigation(const std::string& response, int navigation_id);
+
+ std::unique_ptr<PageNavigationThrottle> GetThrottleForNavigation(
+ NavigationHandle* navigation_handle);
+
+ void OnPageNavigationThrottleDisposed(int navigation_id);
+ void NavigationRequested(const PageNavigationThrottle* throttle);
+ void RedirectRequested(const PageNavigationThrottle* throttle);
+
private:
WebContentsImpl* GetWebContents();
void NotifyScreencastVisibility(bool visible);
@@ -120,6 +133,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_;

Powered by Google App Engine
This is Rietveld 408576698