| 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 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 | 99 |
| 100 // Creates a new ExtensionHostDelegate instance. | 100 // Creates a new ExtensionHostDelegate instance. |
| 101 virtual scoped_ptr<ExtensionHostDelegate> CreateExtensionHostDelegate() = 0; | 101 virtual scoped_ptr<ExtensionHostDelegate> CreateExtensionHostDelegate() = 0; |
| 102 | 102 |
| 103 // Returns true if the client version has updated since the last run. Called | 103 // Returns true if the client version has updated since the last run. Called |
| 104 // once each time the extensions system is loaded per browser_context. The | 104 // once each time the extensions system is loaded per browser_context. The |
| 105 // implementation may wish to use the BrowserContext to record the current | 105 // implementation may wish to use the BrowserContext to record the current |
| 106 // version for later comparison. | 106 // version for later comparison. |
| 107 virtual bool DidVersionUpdate(content::BrowserContext* context) = 0; | 107 virtual bool DidVersionUpdate(content::BrowserContext* context) = 0; |
| 108 | 108 |
| 109 // Permits an external protocol handler to be launched. See | |
| 110 // ExternalProtocolHandler::PermitLaunchUrl() in Chrome. | |
| 111 virtual void PermitExternalProtocolHandler() = 0; | |
| 112 | |
| 113 // Creates a new AppSorting instance. | 109 // Creates a new AppSorting instance. |
| 114 virtual scoped_ptr<AppSorting> CreateAppSorting() = 0; | 110 virtual scoped_ptr<AppSorting> CreateAppSorting() = 0; |
| 115 | 111 |
| 116 // Return true if the system is run in forced app mode. | 112 // Return true if the system is run in forced app mode. |
| 117 virtual bool IsRunningInForcedAppMode() = 0; | 113 virtual bool IsRunningInForcedAppMode() = 0; |
| 118 | 114 |
| 119 // Returns the embedder's ApiActivityMonitor for |context|. Returns NULL if | 115 // Returns the embedder's ApiActivityMonitor for |context|. Returns NULL if |
| 120 // the embedder does not monitor extension API activity. | 116 // the embedder does not monitor extension API activity. |
| 121 virtual ApiActivityMonitor* GetApiActivityMonitor( | 117 virtual ApiActivityMonitor* GetApiActivityMonitor( |
| 122 content::BrowserContext* context) = 0; | 118 content::BrowserContext* context) = 0; |
| 123 | 119 |
| 124 // Returns the factory that provides an ExtensionSystem to be returned from | 120 // Returns the factory that provides an ExtensionSystem to be returned from |
| 125 // ExtensionSystem::Get. | 121 // ExtensionSystem::Get. |
| 126 virtual ExtensionSystemProvider* GetExtensionSystemFactory() = 0; | 122 virtual ExtensionSystemProvider* GetExtensionSystemFactory() = 0; |
| 127 | 123 |
| 128 // Registers extension functions not belonging to the core extensions APIs. | 124 // Registers extension functions not belonging to the core extensions APIs. |
| 129 virtual void RegisterExtensionFunctions( | 125 virtual void RegisterExtensionFunctions( |
| 130 ExtensionFunctionRegistry* registry) const = 0; | 126 ExtensionFunctionRegistry* registry) const = 0; |
| 131 | 127 |
| 132 // Returns the single instance of |this|. | 128 // Returns the single instance of |this|. |
| 133 static ExtensionsBrowserClient* Get(); | 129 static ExtensionsBrowserClient* Get(); |
| 134 | 130 |
| 135 // Initialize the single instance. | 131 // Initialize the single instance. |
| 136 static void Set(ExtensionsBrowserClient* client); | 132 static void Set(ExtensionsBrowserClient* client); |
| 137 }; | 133 }; |
| 138 | 134 |
| 139 } // namespace extensions | 135 } // namespace extensions |
| 140 | 136 |
| 141 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 137 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
| OLD | NEW |