| 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; | 15 class ExtensionsAPIClient; |
| 16 | 16 |
| 17 // An ExtensionsBrowserClient that supports a single content::BrowserContent | 17 // An ExtensionsBrowserClient that supports a single content::BrowserContent |
| 18 // with no related incognito context. | 18 // with no related incognito context. |
| 19 class ShellExtensionsBrowserClient : public ExtensionsBrowserClient { | 19 class ShellExtensionsBrowserClient : public ExtensionsBrowserClient { |
| 20 public: | 20 public: |
| 21 // |context| is the single BrowserContext used for IsValidContext() below. | 21 // |context| is the single BrowserContext used for IsValidContext() below. |
| 22 explicit ShellExtensionsBrowserClient(content::BrowserContext* context); | 22 explicit ShellExtensionsBrowserClient(content::BrowserContext* context); |
| 23 virtual ~ShellExtensionsBrowserClient(); | 23 virtual ~ShellExtensionsBrowserClient(); |
| 24 | 24 |
| 25 // ExtensionsBrowserClient overrides: | 25 // ExtensionsBrowserClient overrides: |
| 26 virtual bool IsShuttingDown() OVERRIDE; | 26 virtual bool IsShuttingDown() OVERRIDE; |
| 27 virtual bool AreExtensionsDisabled(const CommandLine& command_line, | 27 virtual bool AreExtensionsDisabled(const base::CommandLine& command_line, |
| 28 content::BrowserContext* context) OVERRIDE; | 28 content::BrowserContext* context) OVERRIDE; |
| 29 virtual bool IsValidContext(content::BrowserContext* context) OVERRIDE; | 29 virtual bool IsValidContext(content::BrowserContext* context) OVERRIDE; |
| 30 virtual bool IsSameContext(content::BrowserContext* first, | 30 virtual bool IsSameContext(content::BrowserContext* first, |
| 31 content::BrowserContext* second) OVERRIDE; | 31 content::BrowserContext* second) OVERRIDE; |
| 32 virtual bool HasOffTheRecordContext(content::BrowserContext* context) | 32 virtual bool HasOffTheRecordContext(content::BrowserContext* context) |
| 33 OVERRIDE; | 33 OVERRIDE; |
| 34 virtual content::BrowserContext* GetOffTheRecordContext( | 34 virtual content::BrowserContext* GetOffTheRecordContext( |
| 35 content::BrowserContext* context) OVERRIDE; | 35 content::BrowserContext* context) OVERRIDE; |
| 36 virtual content::BrowserContext* GetOriginalContext( | 36 virtual content::BrowserContext* GetOriginalContext( |
| 37 content::BrowserContext* context) OVERRIDE; | 37 content::BrowserContext* context) OVERRIDE; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 // The PrefService for |browser_context_|. | 74 // The PrefService for |browser_context_|. |
| 75 scoped_ptr<PrefService> prefs_; | 75 scoped_ptr<PrefService> prefs_; |
| 76 | 76 |
| 77 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); | 77 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsBrowserClient); |
| 78 }; | 78 }; |
| 79 | 79 |
| 80 } // namespace extensions | 80 } // namespace extensions |
| 81 | 81 |
| 82 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ | 82 #endif // APPS_SHELL_BROWSER_SHELL_EXTENSIONS_BROWSER_CLIENT_H_ |
| OLD | NEW |