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 APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ | 5 #ifndef APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ |
6 #define APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ | 6 #define APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "extensions/browser/extensions_browser_client.h" | 9 #include "extensions/browser/extensions_browser_client.h" |
10 | 10 |
11 class PrefService; | 11 class PrefService; |
12 | 12 |
13 namespace extensions { | 13 namespace extensions { |
14 | 14 |
| 15 class ExtensionsAPIClient; |
| 16 |
15 // An ExtensionsBrowserClient that supports a single content::BrowserContent | 17 // An ExtensionsBrowserClient that supports a single content::BrowserContent |
16 // with no related incognito context. | 18 // with no related incognito context. |
17 class ShellExtensionsBrowserClient : public ExtensionsBrowserClient { | 19 class ShellExtensionsBrowserClient : public ExtensionsBrowserClient { |
18 public: | 20 public: |
19 // |context| is the single BrowserContext used for IsValidContext() below. | 21 // |context| is the single BrowserContext used for IsValidContext() below. |
20 explicit ShellExtensionsBrowserClient(content::BrowserContext* context); | 22 explicit ShellExtensionsBrowserClient(content::BrowserContext* context); |
21 virtual ~ShellExtensionsBrowserClient(); | 23 virtual ~ShellExtensionsBrowserClient(); |
22 | 24 |
23 // ExtensionsBrowserClient overrides: | 25 // ExtensionsBrowserClient overrides: |
24 virtual bool IsShuttingDown() OVERRIDE; | 26 virtual bool IsShuttingDown() OVERRIDE; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 virtual ApiActivityMonitor* GetApiActivityMonitor( | 60 virtual ApiActivityMonitor* GetApiActivityMonitor( |
59 content::BrowserContext* context) OVERRIDE; | 61 content::BrowserContext* context) OVERRIDE; |
60 virtual ExtensionSystemProvider* GetExtensionSystemFactory() OVERRIDE; | 62 virtual ExtensionSystemProvider* GetExtensionSystemFactory() OVERRIDE; |
61 virtual void RegisterExtensionFunctions( | 63 virtual void RegisterExtensionFunctions( |
62 ExtensionFunctionRegistry* registry) const OVERRIDE; | 64 ExtensionFunctionRegistry* registry) const OVERRIDE; |
63 | 65 |
64 private: | 66 private: |
65 // The single BrowserContext for app_shell. Not owned. | 67 // The single BrowserContext for app_shell. Not owned. |
66 content::BrowserContext* browser_context_; | 68 content::BrowserContext* browser_context_; |
67 | 69 |
| 70 // Support for extension APIs. |
| 71 scoped_ptr<ExtensionsAPIClient> api_client_; |
| 72 |
68 // The PrefService for |browser_context_|. | 73 // The PrefService for |browser_context_|. |
69 scoped_ptr<PrefService> prefs_; | 74 scoped_ptr<PrefService> prefs_; |
70 | 75 |
71 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); | 76 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); |
72 }; | 77 }; |
73 | 78 |
74 } // namespace extensions | 79 } // namespace extensions |
75 | 80 |
76 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ | 81 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |