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

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: Remove print 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..a8456df4271d6eea8c86a9669679f617ee21f5de 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,15 @@ class PageHandler : public NotificationObserver {
Response SetColorPickerEnabled(bool enabled);
Response RequestAppBanner();
+ Response SetControlNavigations(bool enabled);
+ Response ProcessNavigation(const std::string& response, int navigation_id);
+
+ std::unique_ptr<PageNavigationThrottle> CreateThrottleForNavigation(
+ NavigationHandle* navigation_handle);
+
+ void OnPageNavigationThrottleDisposed(int navigation_id);
+ void NavigationRequested(const PageNavigationThrottle* throttle);
+
private:
WebContentsImpl* GetWebContents();
void NotifyScreencastVisibility(bool visible);
@@ -120,6 +132,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_;
« no previous file with comments | « content/browser/devtools/protocol/devtools_protocol_browsertest.cc ('k') | content/browser/devtools/protocol/page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698