| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "extensions/shell/browser/shell_extensions_browser_client.h" | 5 #include "extensions/shell/browser/shell_extensions_browser_client.h" |
| 6 | 6 |
| 7 #include "content/public/browser/browser_thread.h" | 7 #include "content/public/browser/browser_thread.h" |
| 8 #include "extensions/browser/api/extensions_api_client.h" | 8 #include "extensions/browser/api/extensions_api_client.h" |
| 9 #include "extensions/browser/api/generated_api_registration.h" | 9 #include "extensions/browser/api/generated_api_registration.h" |
| 10 #include "extensions/browser/app_sorting.h" | 10 #include "extensions/browser/app_sorting.h" |
| 11 #include "extensions/browser/event_router.h" | 11 #include "extensions/browser/event_router.h" |
| 12 #include "extensions/browser/extension_function_registry.h" | 12 #include "extensions/browser/extension_function_registry.h" |
| 13 #include "extensions/browser/null_app_sorting.h" | 13 #include "extensions/browser/null_app_sorting.h" |
| 14 #include "extensions/browser/updater/null_extension_cache.h" | 14 #include "extensions/browser/updater/null_extension_cache.h" |
| 15 #include "extensions/browser/url_request_util.h" | 15 #include "extensions/browser/url_request_util.h" |
| 16 #include "extensions/shell/browser/api/generated_api_registration.h" | 16 #include "extensions/shell/browser/api/generated_api_registration.h" |
| 17 #include "extensions/shell/browser/shell_extension_host_delegate.h" | 17 #include "extensions/shell/browser/shell_extension_host_delegate.h" |
| 18 #include "extensions/shell/browser/shell_extension_system_factory.h" | 18 #include "extensions/shell/browser/shell_extension_system_factory.h" |
| 19 #include "extensions/shell/browser/shell_extensions_api_client.h" |
| 19 #include "extensions/shell/browser/shell_runtime_api_delegate.h" | 20 #include "extensions/shell/browser/shell_runtime_api_delegate.h" |
| 20 | 21 |
| 21 using content::BrowserContext; | 22 using content::BrowserContext; |
| 22 using content::BrowserThread; | 23 using content::BrowserThread; |
| 23 | 24 |
| 24 namespace extensions { | 25 namespace extensions { |
| 25 | 26 |
| 26 ShellExtensionsBrowserClient::ShellExtensionsBrowserClient( | 27 ShellExtensionsBrowserClient::ShellExtensionsBrowserClient( |
| 27 BrowserContext* context, | 28 BrowserContext* context, |
| 28 PrefService* pref_service) | 29 PrefService* pref_service) |
| 29 : browser_context_(context), | 30 : browser_context_(context), |
| 30 pref_service_(pref_service), | 31 pref_service_(pref_service), |
| 31 api_client_(new ExtensionsAPIClient), | 32 api_client_(new ShellExtensionsAPIClient), |
| 32 extension_cache_(new NullExtensionCache()) { | 33 extension_cache_(new NullExtensionCache()) { |
| 33 } | 34 } |
| 34 | 35 |
| 35 ShellExtensionsBrowserClient::~ShellExtensionsBrowserClient() { | 36 ShellExtensionsBrowserClient::~ShellExtensionsBrowserClient() { |
| 36 } | 37 } |
| 37 | 38 |
| 38 bool ShellExtensionsBrowserClient::IsShuttingDown() { | 39 bool ShellExtensionsBrowserClient::IsShuttingDown() { |
| 39 return false; | 40 return false; |
| 40 } | 41 } |
| 41 | 42 |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 208 |
| 208 bool ShellExtensionsBrowserClient::IsBackgroundUpdateAllowed() { | 209 bool ShellExtensionsBrowserClient::IsBackgroundUpdateAllowed() { |
| 209 return true; | 210 return true; |
| 210 } | 211 } |
| 211 | 212 |
| 212 bool ShellExtensionsBrowserClient::IsMinBrowserVersionSupported( | 213 bool ShellExtensionsBrowserClient::IsMinBrowserVersionSupported( |
| 213 const std::string& min_version) { | 214 const std::string& min_version) { |
| 214 return true; | 215 return true; |
| 215 } | 216 } |
| 216 | 217 |
| 218 void ShellExtensionsBrowserClient::SetAPIClientForTest( |
| 219 ExtensionsAPIClient* api_client) { |
| 220 api_client_.reset(api_client); |
| 221 } |
| 222 |
| 217 } // namespace extensions | 223 } // namespace extensions |
| OLD | NEW |