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