| 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 "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/prefs/pref_service_factory.h" | 8 #include "base/prefs/pref_service_factory.h" |
| 9 #include "base/prefs/testing_pref_store.h" | 9 #include "base/prefs/testing_pref_store.h" |
| 10 #include "components/pref_registry/pref_registry_syncable.h" | 10 #include "components/pref_registry/pref_registry_syncable.h" |
| 11 #include "components/user_prefs/user_prefs.h" | 11 #include "components/user_prefs/user_prefs.h" |
| 12 #include "extensions/browser/api/extensions_api_client.h" |
| 12 #include "extensions/browser/app_sorting.h" | 13 #include "extensions/browser/app_sorting.h" |
| 13 #include "extensions/browser/extension_function_registry.h" | 14 #include "extensions/browser/extension_function_registry.h" |
| 14 #include "extensions/browser/extension_host_delegate.h" | 15 #include "extensions/browser/extension_host_delegate.h" |
| 15 #include "extensions/browser/extension_prefs.h" | 16 #include "extensions/browser/extension_prefs.h" |
| 16 #include "extensions/common/api/generated_api.h" | 17 #include "extensions/common/api/generated_api.h" |
| 17 #include "extensions/shell/browser/api/shell_extensions_api_client.h" | |
| 18 #include "extensions/shell/browser/shell_app_sorting.h" | 18 #include "extensions/shell/browser/shell_app_sorting.h" |
| 19 #include "extensions/shell/browser/shell_extension_system_factory.h" | 19 #include "extensions/shell/browser/shell_extension_system_factory.h" |
| 20 #include "extensions/shell/browser/shell_extension_web_contents_observer.h" | 20 #include "extensions/shell/browser/shell_extension_web_contents_observer.h" |
| 21 #include "extensions/shell/browser/shell_runtime_api_delegate.h" | 21 #include "extensions/shell/browser/shell_runtime_api_delegate.h" |
| 22 #include "extensions/shell/common/api/generated_api.h" | 22 #include "extensions/shell/common/api/generated_api.h" |
| 23 | 23 |
| 24 using content::BrowserContext; | 24 using content::BrowserContext; |
| 25 | 25 |
| 26 namespace extensions { | 26 namespace extensions { |
| 27 namespace { | 27 namespace { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 void ShellExtensionHostDelegate::OnExtensionHostCreated( | 74 void ShellExtensionHostDelegate::OnExtensionHostCreated( |
| 75 content::WebContents* web_contents) { | 75 content::WebContents* web_contents) { |
| 76 ShellExtensionWebContentsObserver::CreateForWebContents(web_contents); | 76 ShellExtensionWebContentsObserver::CreateForWebContents(web_contents); |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace | 79 } // namespace |
| 80 | 80 |
| 81 ShellExtensionsBrowserClient::ShellExtensionsBrowserClient( | 81 ShellExtensionsBrowserClient::ShellExtensionsBrowserClient( |
| 82 BrowserContext* context) | 82 BrowserContext* context) |
| 83 : browser_context_(context), api_client_(new ShellExtensionsAPIClient) { | 83 : browser_context_(context), api_client_(new ExtensionsAPIClient) { |
| 84 // Set up the preferences service. | 84 // Set up the preferences service. |
| 85 base::PrefServiceFactory factory; | 85 base::PrefServiceFactory factory; |
| 86 factory.set_user_prefs(new TestingPrefStore); | 86 factory.set_user_prefs(new TestingPrefStore); |
| 87 factory.set_extension_prefs(new TestingPrefStore); | 87 factory.set_extension_prefs(new TestingPrefStore); |
| 88 // app_shell should not require syncable preferences, but for now we need to | 88 // app_shell should not require syncable preferences, but for now we need to |
| 89 // recycle some of the RegisterProfilePrefs() code in Chrome. | 89 // recycle some of the RegisterProfilePrefs() code in Chrome. |
| 90 // TODO(jamescook): Convert this to PrefRegistrySimple. | 90 // TODO(jamescook): Convert this to PrefRegistrySimple. |
| 91 user_prefs::PrefRegistrySyncable* pref_registry = | 91 user_prefs::PrefRegistrySyncable* pref_registry = |
| 92 new user_prefs::PrefRegistrySyncable; | 92 new user_prefs::PrefRegistrySyncable; |
| 93 // Prefs should be registered before the PrefService is created. | 93 // Prefs should be registered before the PrefService is created. |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 ComponentExtensionResourceManager* | 240 ComponentExtensionResourceManager* |
| 241 ShellExtensionsBrowserClient::GetComponentExtensionResourceManager() { | 241 ShellExtensionsBrowserClient::GetComponentExtensionResourceManager() { |
| 242 return NULL; | 242 return NULL; |
| 243 } | 243 } |
| 244 | 244 |
| 245 net::NetLog* ShellExtensionsBrowserClient::GetNetLog() { | 245 net::NetLog* ShellExtensionsBrowserClient::GetNetLog() { |
| 246 return NULL; | 246 return NULL; |
| 247 } | 247 } |
| 248 | 248 |
| 249 } // namespace extensions | 249 } // namespace extensions |
| OLD | NEW |