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..ddae45a4d7a08bb3cc0520ec66cc1d8613832ed5 |
| --- /dev/null |
| +++ b/extensions/browser/api/web_request/web_request_event_router_delegate.h |
| @@ -0,0 +1,47 @@ |
| +// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| +// 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 "url/gurl.h" |
| + |
| +namespace content { |
| +class ResourceRequestInfo; |
| +} |
| + |
| +namespace extension_web_request_api_helpers { |
| +struct EventResponseDelta; |
| +} |
| + |
| +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 ExtractRequestInfoDetails( |
| + const content::ResourceRequestInfo* info, |
| + int* tab_id, |
| + int* window_id) = 0; |
|
Fady Samuel
2014/09/12 21:55:40
I wish this information wasn't exposed to extensio
|
| + |
| + // Logs an extension action. |
| + virtual void LogExtensionActivity( |
| + void* profile_id, |
| + 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; |
| +}; |
|
Fady Samuel
2014/09/12 21:55:40
DISALLOW_COPY_AND_ASSIGN?
Xi Han
2014/09/18 16:24:02
Done.
|
| + |
| +} // namespace extensions |
| + |
| +#endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_ |