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

Unified Diff: chrome/browser/extensions/api/web_request/web_request_api.h

Issue 568583002: Introduce WebRequestEventRouterDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename the delegate to WebRequestEventRouterDelegate. Created 6 years, 3 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: chrome/browser/extensions/api/web_request/web_request_api.h
diff --git a/chrome/browser/extensions/api/web_request/web_request_api.h b/chrome/browser/extensions/api/web_request/web_request_api.h
index ad17c4506055c747f1bcffcd500b45dc5a61636c..383042127738dd2f40c0e9deb51ee5109b363de8 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api.h
+++ b/chrome/browser/extensions/api/web_request/web_request_api.h
@@ -54,6 +54,7 @@ namespace extensions {
class InfoMap;
class WebRequestRulesRegistry;
+class WebRequestEventRouterDelegate;
// Support class for the WebRequest API. Lives on the UI thread. Most of the
// work is done by ExtensionWebRequestEventRouter below. This class observes
@@ -410,6 +411,23 @@ class ExtensionWebRequestEventRouter
uint64 request_id,
extensions::RequestStage request_stage);
+ // Extracts from |request| information for the keys requestId, url, method,
+ // frameId, tabId, type, and timeStamp and writes these into |out| to be
+ // passed on to extensions.
+ void ExtractRequestInfo(net::URLRequest* request, base::DictionaryValue* out);
+
+ void ExtractRequestInfoDetails(
+ net::URLRequest* request,
+ bool* is_main_frame,
+ int* frame_id,
+ bool* parent_is_main_frame,
+ int* parent_frame_id,
+ int* tab_id,
+ int* window_id,
+ int* render_process_host_id,
+ int* routing_id,
+ content::ResourceType* resource_type) const;
+
// Sets the flag that |event_type| has been signaled for |request_id|.
// Returns the value of the flag before setting it.
bool GetAndSetSignaled(uint64 request_id, EventTypes event_type);
@@ -464,6 +482,9 @@ class ExtensionWebRequestEventRouter
std::map<RulesRegistryKey,
scoped_refptr<extensions::WebRequestRulesRegistry> > rules_registries_;
+ scoped_ptr<extensions::WebRequestEventRouterDelegate>
+ web_request_event_router_delegate_;
+
DISALLOW_COPY_AND_ASSIGN(ExtensionWebRequestEventRouter);
};

Powered by Google App Engine
This is Rietveld 408576698