Chromium Code Reviews| 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 | 16 |
| 17 template <class T> | 17 template <class T> |
| 18 class ObserverListThreadSafe; | 18 class ObserverListThreadSafe; |
| 19 | 19 |
| 20 namespace content { | 20 namespace content { |
| 21 class BrowserContext; | 21 class BrowserContext; |
| 22 } | 22 } |
| 23 | 23 |
| 24 namespace extensions { | 24 namespace extensions { |
| 25 | 25 |
| 26 class AppViewGuestDelegate; | 26 class AppViewGuestDelegate; |
| 27 class ContentRulesRegistry; | |
| 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 RulesCacheDelegate; | |
| 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 // TODO(wjmaclean): Remove this when (if) ContentRulesRegistry code moves | |
| 96 // to extensions/browser/api. | |
| 97 virtual scoped_refptr<RulesRegistry> GetContentRulesRegistry( | |
| 98 content::BrowserContext* browser_context, | |
| 99 RulesCacheDelegate* cache_delegate) const; | |
| 100 virtual ContentRulesRegistry* ConvertToContentRulesRegistryPtr( | |
|
Ken Rockot(use gerrit already)
2014/09/19 22:56:09
I don't think this should be in ExtensionsAPIClien
| |
| 101 RulesRegistry* rules_registry) const; | |
| 102 | |
| 93 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 103 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
| 94 // should be split into one interface per API. | 104 // should be split into one interface per API. |
| 95 }; | 105 }; |
| 96 | 106 |
| 97 } // namespace extensions | 107 } // namespace extensions |
| 98 | 108 |
| 99 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 109 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
| OLD | NEW |