| 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/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 | 12 |
| 13 class CommandLine; | |
| 14 class ExtensionFunctionRegistry; | 13 class ExtensionFunctionRegistry; |
| 15 class PrefService; | 14 class PrefService; |
| 16 | 15 |
| 16 namespace base { |
| 17 class CommandLine; |
| 18 } |
| 19 |
| 17 namespace content { | 20 namespace content { |
| 18 class BrowserContext; | 21 class BrowserContext; |
| 19 class JavaScriptDialogManager; | 22 class JavaScriptDialogManager; |
| 20 class WebContents; | 23 class WebContents; |
| 21 } | 24 } |
| 22 | 25 |
| 23 namespace extensions { | 26 namespace extensions { |
| 24 | 27 |
| 25 class ApiActivityMonitor; | 28 class ApiActivityMonitor; |
| 26 class AppSorting; | 29 class AppSorting; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 37 // they are only used in the browser process. | 40 // they are only used in the browser process. |
| 38 class ExtensionsBrowserClient { | 41 class ExtensionsBrowserClient { |
| 39 public: | 42 public: |
| 40 virtual ~ExtensionsBrowserClient() {} | 43 virtual ~ExtensionsBrowserClient() {} |
| 41 | 44 |
| 42 // Returns true if the embedder has started shutting down. | 45 // Returns true if the embedder has started shutting down. |
| 43 virtual bool IsShuttingDown() = 0; | 46 virtual bool IsShuttingDown() = 0; |
| 44 | 47 |
| 45 // Returns true if extensions have been disabled (e.g. via a command-line flag | 48 // Returns true if extensions have been disabled (e.g. via a command-line flag |
| 46 // or preference). | 49 // or preference). |
| 47 virtual bool AreExtensionsDisabled(const CommandLine& command_line, | 50 virtual bool AreExtensionsDisabled(const base::CommandLine& command_line, |
| 48 content::BrowserContext* context) = 0; | 51 content::BrowserContext* context) = 0; |
| 49 | 52 |
| 50 // Returns true if the |context| is known to the embedder. | 53 // Returns true if the |context| is known to the embedder. |
| 51 virtual bool IsValidContext(content::BrowserContext* context) = 0; | 54 virtual bool IsValidContext(content::BrowserContext* context) = 0; |
| 52 | 55 |
| 53 // Returns true if the BrowserContexts could be considered equivalent, for | 56 // Returns true if the BrowserContexts could be considered equivalent, for |
| 54 // example, if one is an off-the-record context owned by the other. | 57 // example, if one is an off-the-record context owned by the other. |
| 55 virtual bool IsSameContext(content::BrowserContext* first, | 58 virtual bool IsSameContext(content::BrowserContext* first, |
| 56 content::BrowserContext* second) = 0; | 59 content::BrowserContext* second) = 0; |
| 57 | 60 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 // Returns the single instance of |this|. | 141 // Returns the single instance of |this|. |
| 139 static ExtensionsBrowserClient* Get(); | 142 static ExtensionsBrowserClient* Get(); |
| 140 | 143 |
| 141 // Initialize the single instance. | 144 // Initialize the single instance. |
| 142 static void Set(ExtensionsBrowserClient* client); | 145 static void Set(ExtensionsBrowserClient* client); |
| 143 }; | 146 }; |
| 144 | 147 |
| 145 } // namespace extensions | 148 } // namespace extensions |
| 146 | 149 |
| 147 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 150 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
| OLD | NEW |