Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_ |
| 6 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_ | 6 #define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 | 11 |
| 12 class GURL; | 12 class GURL; |
| 13 | 13 |
| 14 namespace base { | 14 namespace base { |
| 15 class DictionaryValue; | 15 class DictionaryValue; |
| 16 } // namspace base | 16 } // namspace base |
| 17 | 17 |
| 18 namespace content { | |
| 19 class BrowserContext; | |
| 20 } // namespace content | |
| 21 | |
| 18 namespace net { | 22 namespace net { |
| 19 class URLRequest; | 23 class URLRequest; |
| 20 } // namspace net | 24 } // namspace net |
| 21 | 25 |
| 22 namespace extension_web_request_api_helpers { | 26 namespace extension_web_request_api_helpers { |
| 23 struct EventResponseDelta; | 27 struct EventResponseDelta; |
| 24 } // extension_web_request_api_helpers | 28 } // extension_web_request_api_helpers |
| 25 | 29 |
| 26 namespace extensions { | 30 namespace extensions { |
| 27 | 31 |
| 28 // A delegate class of WebRequestApi that are not a part of chrome. | 32 // A delegate class of WebRequestApi that are not a part of chrome. |
| 29 class WebRequestEventRouterDelegate { | 33 class WebRequestEventRouterDelegate { |
| 30 public: | 34 public: |
| 31 WebRequestEventRouterDelegate(); | 35 WebRequestEventRouterDelegate(); |
| 32 virtual ~WebRequestEventRouterDelegate(); | 36 virtual ~WebRequestEventRouterDelegate(); |
| 33 | 37 |
| 34 // Looks up the tab and window ID for a given request. | 38 // Looks up the tab and window ID for a given request. |
| 35 // Called on the IO thread. | 39 // Called on the IO thread. |
| 36 virtual void ExtractExtraRequestDetails( | 40 virtual void ExtractExtraRequestDetails( |
| 37 net::URLRequest* request, base::DictionaryValue* out) = 0; | 41 net::URLRequest* request, base::DictionaryValue* out) = 0; |
| 38 | 42 |
| 39 // Called to check extra parameters (e.g., tab_id, windown_id) when filtering | 43 // Called to check extra parameters (e.g., tab_id, windown_id) when filtering |
| 40 // event listeners. | 44 // event listeners. |
| 41 virtual bool OnGetMatchingListenersImplCheck( | 45 virtual bool OnGetMatchingListenersImplCheck( |
| 42 int tab_id, int window_id, net::URLRequest* request); | 46 int tab_id, int window_id, net::URLRequest* request); |
| 43 | 47 |
| 44 // Logs an extension action. | 48 // Logs an extension action. |
| 45 virtual void LogExtensionActivity( | 49 virtual void LogExtensionActivity( |
| 46 void* browser_context_id, | 50 content::BrowserContext* browser_context_id, |
|
Fady Samuel
2014/09/22 17:21:21
Rename to browser_context
Xi Han
2014/09/22 17:50:26
Done.
| |
| 47 bool is_incognito, | 51 bool is_incognito, |
| 48 const std::string& extension_id, | 52 const std::string& extension_id, |
| 49 const GURL& url, | 53 const GURL& url, |
| 50 const std::string& api_calli, | 54 const std::string& api_call, |
| 51 const extension_web_request_api_helpers::EventResponseDelta& delta) = 0; | 55 scoped_ptr<base::DictionaryValue> details) = 0; |
| 52 | 56 |
| 53 DISALLOW_COPY_AND_ASSIGN(WebRequestEventRouterDelegate); | 57 DISALLOW_COPY_AND_ASSIGN(WebRequestEventRouterDelegate); |
| 54 }; | 58 }; |
| 55 | 59 |
| 56 } // namespace extensions | 60 } // namespace extensions |
| 57 | 61 |
| 58 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_ H_ | 62 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_ H_ |
| OLD | NEW |