OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_EXTENSIONS_BROWSER_CLIENT_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 10 matching lines...) Expand all Loading... |
21 class BrowserContext; | 21 class BrowserContext; |
22 class WebContents; | 22 class WebContents; |
23 } | 23 } |
24 | 24 |
25 namespace extensions { | 25 namespace extensions { |
26 | 26 |
27 class ApiActivityMonitor; | 27 class ApiActivityMonitor; |
28 class AppSorting; | 28 class AppSorting; |
29 class Extension; | 29 class Extension; |
30 class ExtensionHostDelegate; | 30 class ExtensionHostDelegate; |
| 31 class ExtensionPrefs; |
31 class ExtensionSystem; | 32 class ExtensionSystem; |
32 class ExtensionSystemProvider; | 33 class ExtensionSystemProvider; |
33 | 34 |
34 // Interface to allow the extensions module to make browser-process-specific | 35 // Interface to allow the extensions module to make browser-process-specific |
35 // queries of the embedder. Should be Set() once in the browser process. | 36 // queries of the embedder. Should be Set() once in the browser process. |
36 // | 37 // |
37 // NOTE: Methods that do not require knowledge of browser concepts should be | 38 // NOTE: Methods that do not require knowledge of browser concepts should be |
38 // added in ExtensionsClient (extensions/common/extensions_client.h) even if | 39 // added in ExtensionsClient (extensions/common/extensions_client.h) even if |
39 // they are only used in the browser process. | 40 // they are only used in the browser process. |
40 class ExtensionsBrowserClient { | 41 class ExtensionsBrowserClient { |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 content::BrowserContext* context) = 0; | 123 content::BrowserContext* context) = 0; |
123 | 124 |
124 // Returns the factory that provides an ExtensionSystem to be returned from | 125 // Returns the factory that provides an ExtensionSystem to be returned from |
125 // ExtensionSystem::Get. | 126 // ExtensionSystem::Get. |
126 virtual ExtensionSystemProvider* GetExtensionSystemFactory() = 0; | 127 virtual ExtensionSystemProvider* GetExtensionSystemFactory() = 0; |
127 | 128 |
128 // Registers extension functions not belonging to the core extensions APIs. | 129 // Registers extension functions not belonging to the core extensions APIs. |
129 virtual void RegisterExtensionFunctions( | 130 virtual void RegisterExtensionFunctions( |
130 ExtensionFunctionRegistry* registry) const = 0; | 131 ExtensionFunctionRegistry* registry) const = 0; |
131 | 132 |
| 133 // Registers client observers on each per-context ExtensionPrefs instance. |
| 134 virtual void AddExtensionPrefsObservers(content::BrowserContext* context, |
| 135 ExtensionPrefs* prefs) const = 0; |
| 136 |
132 // Returns the single instance of |this|. | 137 // Returns the single instance of |this|. |
133 static ExtensionsBrowserClient* Get(); | 138 static ExtensionsBrowserClient* Get(); |
134 | 139 |
135 // Initialize the single instance. | 140 // Initialize the single instance. |
136 static void Set(ExtensionsBrowserClient* client); | 141 static void Set(ExtensionsBrowserClient* client); |
137 }; | 142 }; |
138 | 143 |
139 } // namespace extensions | 144 } // namespace extensions |
140 | 145 |
141 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 146 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |