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_content/content_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; |
35 class WebRequestEventRouterDelegate; | 36 class WebRequestEventRouterDelegate; |
| 37 class RulesCacheDelegate; |
36 class SettingsObserver; | 38 class SettingsObserver; |
37 class SettingsStorageFactory; | 39 class SettingsStorageFactory; |
38 class ValueStoreCache; | 40 class ValueStoreCache; |
39 | 41 |
40 // Allows the embedder of the extensions module to customize its support for | 42 // Allows the embedder of the extensions module to customize its support for |
41 // API features. The embedder must create a single instance in the browser | 43 // API features. The embedder must create a single instance in the browser |
42 // process. Provides a default implementation that does nothing. | 44 // process. Provides a default implementation that does nothing. |
43 class ExtensionsAPIClient { | 45 class ExtensionsAPIClient { |
44 public: | 46 public: |
45 // Construction sets the single instance. | 47 // Construction sets the single instance. |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 // extensions/browser/api/declarative/. | 90 // extensions/browser/api/declarative/. |
89 virtual scoped_refptr<RulesRegistry> GetRulesRegistry( | 91 virtual scoped_refptr<RulesRegistry> GetRulesRegistry( |
90 content::BrowserContext* browser_context, | 92 content::BrowserContext* browser_context, |
91 const RulesRegistry::WebViewKey& webview_key, | 93 const RulesRegistry::WebViewKey& webview_key, |
92 const std::string& event_name); | 94 const std::string& event_name); |
93 | 95 |
94 // Creates a delegate for WebRequestEventRouter. | 96 // Creates a delegate for WebRequestEventRouter. |
95 virtual WebRequestEventRouterDelegate* CreateWebRequestEventRouterDelegate() | 97 virtual WebRequestEventRouterDelegate* CreateWebRequestEventRouterDelegate() |
96 const; | 98 const; |
97 | 99 |
| 100 // TODO(wjmaclean): Remove this when (if) ContentRulesRegistry code moves |
| 101 // to extensions/browser/api. |
| 102 virtual scoped_refptr<ContentRulesRegistry> CreateContentRulesRegistry( |
| 103 content::BrowserContext* browser_context, |
| 104 RulesCacheDelegate* cache_delegate) const; |
| 105 |
98 // NOTE: If this interface gains too many methods (perhaps more than 20) it | 106 // NOTE: If this interface gains too many methods (perhaps more than 20) it |
99 // should be split into one interface per API. | 107 // should be split into one interface per API. |
100 }; | 108 }; |
101 | 109 |
102 } // namespace extensions | 110 } // namespace extensions |
103 | 111 |
104 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ | 112 #endif // EXTENSIONS_BROWSER_API_EXTENSIONS_API_CLIENT_H_ |
OLD | NEW |