Chromium Code Reviews| Index: extensions/browser/api/web_request/web_request_event_router_delegate.h |
| diff --git a/extensions/browser/api/web_request/web_request_event_router_delegate.h b/extensions/browser/api/web_request/web_request_event_router_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..875946fe4718a55843aab9d01270f3709e4bd0e0 |
| --- /dev/null |
| +++ b/extensions/browser/api/web_request/web_request_event_router_delegate.h |
| @@ -0,0 +1,57 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
|
Ken Rockot(use gerrit already)
2014/09/19 20:52:27
New files should use new copyright notice style (n
Xi Han
2014/09/19 22:05:56
Done.
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_ |
| +#define EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/values.h" |
| +#include "url/gurl.h" |
|
Ken Rockot(use gerrit already)
2014/09/19 20:52:27
you can just forward-declare GURL instead of inclu
Xi Han
2014/09/19 22:05:56
Done.
|
| + |
| +namespace content { |
| +class ResourceRequestInfo; |
|
Ken Rockot(use gerrit already)
2014/09/19 20:52:27
not used
Xi Han
2014/09/19 22:05:56
Removed.
|
| +} // namespace content |
|
Ken Rockot(use gerrit already)
2014/09/19 20:52:28
FYI I don't think it's necessary to include closin
Xi Han
2014/09/19 22:05:56
I agree:)
|
| + |
| +namespace net { |
| +class URLRequest; |
| +} // namspace net |
| + |
| +namespace extension_web_request_api_helpers { |
| +struct EventResponseDelta; |
| +} // extension_web_request_api_helpers |
| + |
| +namespace extensions { |
| + |
| +// A delegate class of WebRequestApi that are not a part of chrome. |
| +class WebRequestEventRouterDelegate { |
| + public: |
| + WebRequestEventRouterDelegate(); |
| + virtual ~WebRequestEventRouterDelegate(); |
| + |
| + // Looks up the tab and window ID for a given request. |
| + // Called on the IO thread. |
| + virtual void ExtractExtraRequestDetails( |
| + net::URLRequest* request, base::DictionaryValue* out) = 0; |
| + |
| + // Called to check extra parameters (e.g., tab_id, windown_id) when filtering |
| + // event listeners. |
| + virtual bool OnGetMachingListernersImplCheck( |
| + int tab_id, int window_id, net::URLRequest* request); |
| + |
| + // Logs an extension action. |
| + virtual void LogExtensionActivity( |
| + void* profile_id, |
|
Ken Rockot(use gerrit already)
2014/09/19 20:52:28
Could you change this to browser_context_id? And a
Fady Samuel
2014/09/19 20:56:26
IIRC, we are on the IO thread here, but I'm not 10
Xi Han
2014/09/19 22:05:56
Done.
|
| + bool is_incognito, |
| + const std::string& extension_id, |
| + const GURL& url, |
| + const std::string& api_calli, |
| + const extension_web_request_api_helpers::EventResponseDelta& delta) = 0; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(WebRequestEventRouterDelegate); |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_ |