Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: extensions/browser/extensions_browser_client.h

Issue 137753016: ExtensionSystem cleanup part 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: deps Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 12
13 class BrowserContextKeyedServiceFactory;
14 class CommandLine; 13 class CommandLine;
15 class PrefService; 14 class PrefService;
16 15
17 namespace content { 16 namespace content {
18 class BrowserContext; 17 class BrowserContext;
19 class JavaScriptDialogManager; 18 class JavaScriptDialogManager;
20 class WebContents; 19 class WebContents;
21 } 20 }
22 21
23 namespace extensions { 22 namespace extensions {
24 23
25 class ApiActivityMonitor; 24 class ApiActivityMonitor;
26 class AppSorting; 25 class AppSorting;
27 class Extension; 26 class Extension;
28 class ExtensionHost; 27 class ExtensionHost;
29 class ExtensionSystem; 28 class ExtensionSystem;
29 class ExtensionSystemProvider;
30 30
31 // Interface to allow the extensions module to make browser-process-specific 31 // Interface to allow the extensions module to make browser-process-specific
32 // queries of the embedder. Should be Set() once in the browser process. 32 // queries of the embedder. Should be Set() once in the browser process.
33 // 33 //
34 // NOTE: Methods that do not require knowledge of browser concepts should be 34 // NOTE: Methods that do not require knowledge of browser concepts should be
35 // added in ExtensionsClient (extensions/common/extensions_client.h) even if 35 // added in ExtensionsClient (extensions/common/extensions_client.h) even if
36 // they are only used in the browser process. 36 // they are only used in the browser process.
37 class ExtensionsBrowserClient { 37 class ExtensionsBrowserClient {
38 public: 38 public:
39 virtual ~ExtensionsBrowserClient() {} 39 virtual ~ExtensionsBrowserClient() {}
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 // Returns the embedder's JavaScriptDialogManager or NULL if the embedder 113 // Returns the embedder's JavaScriptDialogManager or NULL if the embedder
114 // does not support JavaScript dialogs. 114 // does not support JavaScript dialogs.
115 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() = 0; 115 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() = 0;
116 116
117 // Returns the embedder's ApiActivityMonitor for |context|. Returns NULL if 117 // Returns the embedder's ApiActivityMonitor for |context|. Returns NULL if
118 // the embedder does not monitor extension API activity. 118 // the embedder does not monitor extension API activity.
119 virtual ApiActivityMonitor* GetApiActivityMonitor( 119 virtual ApiActivityMonitor* GetApiActivityMonitor(
120 content::BrowserContext* context) = 0; 120 content::BrowserContext* context) = 0;
121 121
122 // Returns the dependencies of ExtensionSystem. May return an empty list. 122 // Returns the factory that provides an ExtensionSystem to be returned from
123 virtual std::vector<BrowserContextKeyedServiceFactory*> 123 // ExtensionSystem::Get.
124 GetExtensionSystemDependencies() = 0; 124 virtual ExtensionSystemProvider* GetExtensionSystemFactory() = 0;
James Cook 2014/02/12 17:18:12 Nice, I like this approach.
125
126 // Creates a new ExtensionSystem for |context|.
127 virtual ExtensionSystem* CreateExtensionSystem(
128 content::BrowserContext* context) = 0;
129 125
130 // Returns the single instance of |this|. 126 // Returns the single instance of |this|.
131 static ExtensionsBrowserClient* Get(); 127 static ExtensionsBrowserClient* Get();
132 128
133 // Initialize the single instance. 129 // Initialize the single instance.
134 static void Set(ExtensionsBrowserClient* client); 130 static void Set(ExtensionsBrowserClient* client);
135 }; 131 };
136 132
137 } // namespace extensions 133 } // namespace extensions
138 134
139 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ 135 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698