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 <memory> | |
9 #include <string> | 8 #include <string> |
10 | 9 |
11 #include "base/macros.h" | |
12 | |
13 class GURL; | |
14 | |
15 namespace base { | |
16 class DictionaryValue; | |
17 } // namespace base | |
18 | |
19 namespace content { | |
20 class BrowserContext; | |
21 } // namespace content | |
22 | |
23 namespace net { | |
24 class URLRequest; | |
25 } // namespace net | |
26 | |
27 namespace extensions { | 10 namespace extensions { |
28 | 11 |
29 class WebRequestEventDetails; | |
30 | |
31 // A delegate class of WebRequestApi that are not a part of chrome. | 12 // A delegate class of WebRequestApi that are not a part of chrome. |
32 class WebRequestEventRouterDelegate { | 13 class WebRequestEventRouterDelegate { |
33 public: | 14 public: |
34 WebRequestEventRouterDelegate(); | 15 virtual ~WebRequestEventRouterDelegate() {} |
35 virtual ~WebRequestEventRouterDelegate(); | |
36 | |
37 // Logs an extension action. | |
38 virtual void LogExtensionActivity( | |
39 content::BrowserContext* browser_context, | |
40 bool is_incognito, | |
41 const std::string& extension_id, | |
42 const GURL& url, | |
43 const std::string& api_call, | |
44 std::unique_ptr<base::DictionaryValue> details) {} | |
45 | 16 |
46 // Notifies that a webRequest event that normally would be forwarded to a | 17 // Notifies that a webRequest event that normally would be forwarded to a |
47 // listener was instead blocked because of withheld permissions. | 18 // listener was instead blocked because of withheld permissions. |
48 virtual void NotifyWebRequestWithheld(int render_process_id, | 19 virtual void NotifyWebRequestWithheld(int render_process_id, |
49 int render_frame_id, | 20 int render_frame_id, |
50 const std::string& extension_id) {} | 21 const std::string& extension_id) = 0; |
51 | |
52 private: | |
53 DISALLOW_COPY_AND_ASSIGN(WebRequestEventRouterDelegate); | |
54 }; | 22 }; |
55 | 23 |
56 } // namespace extensions | 24 } // namespace extensions |
57 | 25 |
58 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_
H_ | 26 #endif // EXTENSIONS_BROWSER_API_WEB_REQUEST_WEB_REQUEST_EVENT_ROUTER_DELEGATE_
H_ |
OLD | NEW |