| 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_EXTENSIONS_API_CLIENT_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| 6 #define EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 6 #define EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "extensions/browser/api/declarative/rules_registry.h" | 12 #include "extensions/browser/api/declarative/rules_registry.h" |
| 13 #include "extensions/browser/api/storage/settings_namespace.h" | 13 #include "extensions/browser/api/storage/settings_namespace.h" |
| 14 | 14 |
| 15 class GURL; | 15 class GURL; |
| 16 class ExtraRequestParams; |
| 16 | 17 |
| 17 template <class T> | 18 template <class T> |
| 18 class ObserverListThreadSafe; | 19 class ObserverListThreadSafe; |
| 19 | 20 |
| 20 namespace content { | 21 namespace content { |
| 21 class BrowserContext; | 22 class BrowserContext; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace extensions { | 25 namespace extensions { |
| 25 | 26 |
| 26 class AppViewGuestDelegate; | 27 class AppViewGuestDelegate; |
| 27 class ExtensionOptionsGuest; | 28 class ExtensionOptionsGuest; |
| 28 class ExtensionOptionsGuestDelegate; | 29 class ExtensionOptionsGuestDelegate; |
| 29 class MimeHandlerViewGuest; | 30 class MimeHandlerViewGuest; |
| 30 class MimeHandlerViewGuestDelegate; | 31 class MimeHandlerViewGuestDelegate; |
| 31 class WebViewGuest; | 32 class WebViewGuest; |
| 32 class WebViewGuestDelegate; | 33 class WebViewGuestDelegate; |
| 33 class WebViewPermissionHelper; | 34 class WebViewPermissionHelper; |
| 34 class WebViewPermissionHelperDelegate; | 35 class WebViewPermissionHelperDelegate; |
| 36 class WebRequestEventRouterDelegate; |
| 35 class SettingsObserver; | 37 class SettingsObserver; |
| 36 class SettingsStorageFactory; | 38 class SettingsStorageFactory; |
| 37 class ValueStoreCache; | 39 class ValueStoreCache; |
| 38 | 40 |
| 39 // Allows the embedder of the extensions module to customize its support for | 41 // Allows the embedder of the extensions module to customize its support for |
| 40 // API features. The embedder must create a single instance in the browser | 42 // API features. The embedder must create a single instance in the browser |
| 41 // process. Provides a default implementation that does nothing. | 43 // process. Provides a default implementation that does nothing. |
| 42 class ExtensionsAPIClient { | 44 class ExtensionsAPIClient { |
| 43 public: | 45 public: |
| 44 // Construction sets the single instance. | 46 // Construction sets the single instance. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 CreateWebViewPermissionHelperDelegate ( | 85 CreateWebViewPermissionHelperDelegate ( |
| 84 WebViewPermissionHelper* web_view_permission_helper) const; | 86 WebViewPermissionHelper* web_view_permission_helper) const; |
| 85 | 87 |
| 86 // TODO(wjmaclean): Remove this as soon as rules_registry_service.* moves to | 88 // TODO(wjmaclean): Remove this as soon as rules_registry_service.* moves to |
| 87 // extensions/browser/api/declarative/. | 89 // extensions/browser/api/declarative/. |
| 88 virtual scoped_refptr<RulesRegistry> GetRulesRegistry( | 90 virtual scoped_refptr<RulesRegistry> GetRulesRegistry( |
| 89 content::BrowserContext* browser_context, | 91 content::BrowserContext* browser_context, |
| 90 const RulesRegistry::WebViewKey& webview_key, | 92 const RulesRegistry::WebViewKey& webview_key, |
| 91 const std::string& event_name); | 93 const std::string& event_name); |
| 92 | 94 |
| 95 // Creates a delegate for WebRequestEventRouter. |
| 96 virtual WebRequestEventRouterDelegate* CreateWebRequestEventRouterDelegate() |
| 97 const; |
| 98 |
| 99 // Creates extra parameters for a given request, i.e., tab_id, and window_id. |
| 100 virtual ExtraRequestParams* CreateExtraRequestParams() const; |
| 101 |
| 93 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 102 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
| 94 // should be split into one interface per API. | 103 // should be split into one interface per API. |
| 95 }; | 104 }; |
| 96 | 105 |
| 97 } // namespace extensions | 106 } // namespace extensions |
| 98 | 107 |
| 99 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 108 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| OLD | NEW |