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 <vector> |
| 9 |
8 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
9 | 11 |
| 12 class BrowserContextKeyedServiceFactory; |
10 class CommandLine; | 13 class CommandLine; |
11 class PrefService; | 14 class PrefService; |
12 | 15 |
13 namespace content { | 16 namespace content { |
14 class BrowserContext; | 17 class BrowserContext; |
15 class JavaScriptDialogManager; | 18 class JavaScriptDialogManager; |
16 } | 19 } |
17 | 20 |
18 namespace extensions { | 21 namespace extensions { |
19 | 22 |
20 class AppSorting; | 23 class AppSorting; |
| 24 class ExtensionSystem; |
21 | 25 |
22 // Interface to allow the extensions module to make browser-process-specific | 26 // Interface to allow the extensions module to make browser-process-specific |
23 // queries of the embedder. Should be Set() once in the browser process. | 27 // queries of the embedder. Should be Set() once in the browser process. |
24 // | 28 // |
25 // NOTE: Methods that do not require knowledge of browser concepts should be | 29 // NOTE: Methods that do not require knowledge of browser concepts should be |
26 // added in ExtensionsClient (extensions/common/extensions_client.h) even if | 30 // added in ExtensionsClient (extensions/common/extensions_client.h) even if |
27 // they are only used in the browser process. | 31 // they are only used in the browser process. |
28 class ExtensionsBrowserClient { | 32 class ExtensionsBrowserClient { |
29 public: | 33 public: |
30 virtual ~ExtensionsBrowserClient() {} | 34 virtual ~ExtensionsBrowserClient() {} |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 // Creates a new AppSorting instance. | 84 // Creates a new AppSorting instance. |
81 virtual scoped_ptr<AppSorting> CreateAppSorting() = 0; | 85 virtual scoped_ptr<AppSorting> CreateAppSorting() = 0; |
82 | 86 |
83 // Return true if the system is run in forced app mode. | 87 // Return true if the system is run in forced app mode. |
84 virtual bool IsRunningInForcedAppMode() = 0; | 88 virtual bool IsRunningInForcedAppMode() = 0; |
85 | 89 |
86 // Returns the embedder's JavaScriptDialogManager or NULL if the embedder | 90 // Returns the embedder's JavaScriptDialogManager or NULL if the embedder |
87 // does not support JavaScript dialogs. | 91 // does not support JavaScript dialogs. |
88 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() = 0; | 92 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() = 0; |
89 | 93 |
| 94 // Returns the dependencies of ExtensionSystem. May return an empty list. |
| 95 virtual std::vector<BrowserContextKeyedServiceFactory*> |
| 96 GetExtensionSystemDependencies() = 0; |
| 97 |
| 98 // Creates a new ExtensionSystem for |context|. |
| 99 virtual ExtensionSystem* CreateExtensionSystem( |
| 100 content::BrowserContext* context) = 0; |
| 101 |
90 // Returns the single instance of |this|. | 102 // Returns the single instance of |this|. |
91 static ExtensionsBrowserClient* Get(); | 103 static ExtensionsBrowserClient* Get(); |
92 | 104 |
93 // Initialize the single instance. | 105 // Initialize the single instance. |
94 static void Set(ExtensionsBrowserClient* client); | 106 static void Set(ExtensionsBrowserClient* client); |
95 }; | 107 }; |
96 | 108 |
97 } // namespace extensions | 109 } // namespace extensions |
98 | 110 |
99 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 111 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |