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 |
| 11 #include "base/memory/ref_counted.h" |
11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
12 #include "extensions/browser/extension_event_histogram_value.h" | 13 #include "extensions/browser/extension_event_histogram_value.h" |
13 #include "extensions/browser/extension_prefs_observer.h" | 14 #include "extensions/browser/extension_prefs_observer.h" |
14 #include "extensions/common/view_type.h" | 15 #include "extensions/common/view_type.h" |
15 | 16 |
16 class ExtensionFunctionRegistry; | 17 class ExtensionFunctionRegistry; |
17 class PrefService; | 18 class PrefService; |
18 | 19 |
19 namespace base { | 20 namespace base { |
20 class CommandLine; | 21 class CommandLine; |
21 class FilePath; | 22 class FilePath; |
22 class ListValue; | 23 class ListValue; |
23 } | 24 } |
24 | 25 |
25 namespace content { | 26 namespace content { |
26 class BrowserContext; | 27 class BrowserContext; |
27 class RenderFrameHost; | 28 class RenderFrameHost; |
28 class WebContents; | 29 class WebContents; |
29 } | 30 } |
30 | 31 |
31 namespace net { | 32 namespace net { |
32 class NetLog; | 33 class NetLog; |
33 class NetworkDelegate; | 34 class NetworkDelegate; |
34 class URLRequest; | 35 class URLRequest; |
35 class URLRequestJob; | 36 class URLRequestJob; |
36 } | 37 } |
37 | 38 |
| 39 namespace update_client { |
| 40 class UpdateClient; |
| 41 } |
| 42 |
38 namespace extensions { | 43 namespace extensions { |
39 | 44 |
40 class ApiActivityMonitor; | 45 class ApiActivityMonitor; |
41 class ComponentExtensionResourceManager; | 46 class ComponentExtensionResourceManager; |
42 class Extension; | 47 class Extension; |
43 class ExtensionCache; | 48 class ExtensionCache; |
44 class ExtensionError; | 49 class ExtensionError; |
45 class ExtensionHostDelegate; | 50 class ExtensionHostDelegate; |
46 class ExtensionPrefsObserver; | 51 class ExtensionPrefsObserver; |
47 class ExtensionSystem; | 52 class ExtensionSystem; |
48 class ExtensionSystemProvider; | 53 class ExtensionSystemProvider; |
49 class ExtensionWebContentsObserver; | 54 class ExtensionWebContentsObserver; |
50 class InfoMap; | 55 class InfoMap; |
51 class ProcessManagerDelegate; | 56 class ProcessManagerDelegate; |
52 class RuntimeAPIDelegate; | 57 class RuntimeAPIDelegate; |
| 58 class UpdateClientConfig; |
53 | 59 |
54 // Interface to allow the extensions module to make browser-process-specific | 60 // Interface to allow the extensions module to make browser-process-specific |
55 // queries of the embedder. Should be Set() once in the browser process. | 61 // queries of the embedder. Should be Set() once in the browser process. |
56 // | 62 // |
57 // NOTE: Methods that do not require knowledge of browser concepts should be | 63 // NOTE: Methods that do not require knowledge of browser concepts should be |
58 // added in ExtensionsClient (extensions/common/extensions_client.h) even if | 64 // added in ExtensionsClient (extensions/common/extensions_client.h) even if |
59 // they are only used in the browser process. | 65 // they are only used in the browser process. |
60 class ExtensionsBrowserClient { | 66 class ExtensionsBrowserClient { |
61 public: | 67 public: |
62 virtual ~ExtensionsBrowserClient() {} | 68 virtual ~ExtensionsBrowserClient() {} |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 virtual void CleanUpWebView(content::BrowserContext* browser_context, | 232 virtual void CleanUpWebView(content::BrowserContext* browser_context, |
227 int embedder_process_id, | 233 int embedder_process_id, |
228 int view_instance_id) {} | 234 int view_instance_id) {} |
229 | 235 |
230 // Attaches the task manager extension tag to |web_contents|, if needed based | 236 // Attaches the task manager extension tag to |web_contents|, if needed based |
231 // on |view_type|, so that its corresponding task shows up in the task | 237 // on |view_type|, so that its corresponding task shows up in the task |
232 // manager. | 238 // manager. |
233 virtual void AttachExtensionTaskManagerTag(content::WebContents* web_contents, | 239 virtual void AttachExtensionTaskManagerTag(content::WebContents* web_contents, |
234 ViewType view_type) {} | 240 ViewType view_type) {} |
235 | 241 |
| 242 // Returns a new UpdateClient. |
| 243 virtual scoped_refptr<update_client::UpdateClient> CreateUpdateClient( |
| 244 content::BrowserContext* context); |
| 245 |
236 // Returns the single instance of |this|. | 246 // Returns the single instance of |this|. |
237 static ExtensionsBrowserClient* Get(); | 247 static ExtensionsBrowserClient* Get(); |
238 | 248 |
239 // Initialize the single instance. | 249 // Initialize the single instance. |
240 static void Set(ExtensionsBrowserClient* client); | 250 static void Set(ExtensionsBrowserClient* client); |
241 }; | 251 }; |
242 | 252 |
243 } // namespace extensions | 253 } // namespace extensions |
244 | 254 |
245 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 255 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |