| 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 | |
| 17 // An ExtensionsBrowserClient that supports a single content::BrowserContent | 15 // An ExtensionsBrowserClient that supports a single content::BrowserContent |
| 18 // with no related incognito context. | 16 // with no related incognito context. |
| 19 class ShellExtensionsBrowserClient : public ExtensionsBrowserClient { | 17 class ShellExtensionsBrowserClient : public ExtensionsBrowserClient { |
| 20 public: | 18 public: |
| 21 // |context| is the single BrowserContext used for IsValidContext() below. | 19 // |context| is the single BrowserContext used for IsValidContext() below. |
| 22 explicit ShellExtensionsBrowserClient(content::BrowserContext* context); | 20 explicit ShellExtensionsBrowserClient(content::BrowserContext* context); |
| 23 virtual ~ShellExtensionsBrowserClient(); | 21 virtual ~ShellExtensionsBrowserClient(); |
| 24 | 22 |
| 25 // ExtensionsBrowserClient overrides: | 23 // ExtensionsBrowserClient overrides: |
| 26 virtual bool IsShuttingDown() OVERRIDE; | 24 virtual bool IsShuttingDown() OVERRIDE; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() | 56 virtual content::JavaScriptDialogManager* GetJavaScriptDialogManager() |
| 59 OVERRIDE; | 57 OVERRIDE; |
| 60 virtual ApiActivityMonitor* GetApiActivityMonitor( | 58 virtual ApiActivityMonitor* GetApiActivityMonitor( |
| 61 content::BrowserContext* context) OVERRIDE; | 59 content::BrowserContext* context) OVERRIDE; |
| 62 virtual ExtensionSystemProvider* GetExtensionSystemFactory() OVERRIDE; | 60 virtual ExtensionSystemProvider* GetExtensionSystemFactory() OVERRIDE; |
| 63 | 61 |
| 64 private: | 62 private: |
| 65 // The single BrowserContext for app_shell. Not owned. | 63 // The single BrowserContext for app_shell. Not owned. |
| 66 content::BrowserContext* browser_context_; | 64 content::BrowserContext* browser_context_; |
| 67 | 65 |
| 68 // Support for extension APIs. | |
| 69 scoped_ptr<ExtensionsAPIClient> api_client_; | |
| 70 | |
| 71 // The PrefService for |browser_context_|. | 66 // The PrefService for |browser_context_|. |
| 72 scoped_ptr<PrefService> prefs_; | 67 scoped_ptr<PrefService> prefs_; |
| 73 | 68 |
| 74 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); | 69 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); |
| 75 }; | 70 }; |
| 76 | 71 |
| 77 } // namespace extensions | 72 } // namespace extensions |
| 78 | 73 |
| 79 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ | 74 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ |
| OLD | NEW |