Revert "Fix broken channel icon in chrome://help on CrOS" and try again
[chromium-blink-merge.git] / extensions / browser / api / web_request / web_request_event_router_delegate.h
blob49e30fec842c4b99b1f8c89a2888b75b8822c844
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
3 // found in the LICENSE file.
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_
8 #include <string>
10 #include "base/values.h"
12 class GURL;
14 namespace base {
15 class DictionaryValue;
16 } // namspace base
18 namespace content {
19 class BrowserContext;
20 } // namespace content
22 namespace net {
23 class URLRequest;
24 } // namspace net
26 namespace extensions {
28 // A delegate class of WebRequestApi that are not a part of chrome.
29 class WebRequestEventRouterDelegate {
30 public:
31 WebRequestEventRouterDelegate();
32 virtual ~WebRequestEventRouterDelegate();
34 // Looks up the tab and window ID for a given request.
35 // Called on the IO thread.
36 virtual void ExtractExtraRequestDetails(const net::URLRequest* request,
37 base::DictionaryValue* out);
39 // Called to check extra parameters (e.g., tab_id, windown_id) when filtering
40 // event listeners.
41 virtual bool OnGetMatchingListenersImplCheck(int tab_id,
42 int window_id,
43 const net::URLRequest* request);
45 // Logs an extension action.
46 virtual void LogExtensionActivity(content::BrowserContext* browser_context,
47 bool is_incognito,
48 const std::string& extension_id,
49 const GURL& url,
50 const std::string& api_call,
51 scoped_ptr<base::DictionaryValue> details) {
54 private:
55 DISALLOW_COPY_AND_ASSIGN(WebRequestEventRouterDelegate);
58 } // namespace extensions
60 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_H_