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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() | 58 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() |
57 OVERRIDE; | 59 OVERRIDE; |
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 | 63 |
62 private: | 64 private: |
63 // The single BrowserContext for app_shell. Not owned. | 65 // The single BrowserContext for app_shell. Not owned. |
64 content::BrowserContext* browser_context_; | 66 content::BrowserContext* browser_context_; |
65 | 67 |
| 68 // Support for extension APIs. |
| 69 scoped_ptr<ExtensionsAPIClient> api_client_; |
| 70 |
66 // The PrefService for |browser_context_|. | 71 // The PrefService for |browser_context_|. |
67 scoped_ptr<PrefService> prefs_; | 72 scoped_ptr<PrefService> prefs_; |
68 | 73 |
69 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); | 74 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); |
70 }; | 75 }; |
71 | 76 |
72 } // namespace extensions | 77 } // namespace extensions |
73 | 78 |
74 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ | 79 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |