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); |
}; |