Chromium Code Reviews| 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 #include "apps/shell/browser/shell_extensions_browser_client.h" | 5 #include "apps/shell/browser/shell_extensions_browser_client.h" |
| 6 | 6 |
| 7 #include "apps/shell/browser/shell_app_sorting.h" | 7 #include "apps/shell/browser/shell_app_sorting.h" |
| 8 #include "apps/shell/browser/shell_extension_system_factory.h" | 8 #include "apps/shell/browser/shell_extension_system_factory.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/prefs/pref_service_factory.h" | 10 #include "base/prefs/pref_service_factory.h" |
| 11 #include "base/prefs/testing_pref_store.h" | 11 #include "base/prefs/testing_pref_store.h" |
| 12 #include "chrome/common/extensions/api/generated_api.h" | 12 #include "chrome/common/extensions/api/generated_api.h" |
| 13 #include "components/user_prefs/pref_registry_syncable.h" | 13 #include "components/user_prefs/pref_registry_syncable.h" |
| 14 #include "components/user_prefs/user_prefs.h" | 14 #include "components/user_prefs/user_prefs.h" |
| 15 #include "extensions/browser/app_sorting.h" | 15 #include "extensions/browser/app_sorting.h" |
| 16 #include "extensions/browser/extension_prefs.h" | 16 #include "extensions/browser/extension_prefs.h" |
| 17 #include "extensions/common/api/generated_api.h" | |
| 17 | 18 |
| 18 using content::BrowserContext; | 19 using content::BrowserContext; |
| 19 | 20 |
| 20 namespace extensions { | 21 namespace extensions { |
| 21 namespace { | 22 namespace { |
| 22 | 23 |
| 23 // See chrome::RegisterProfilePrefs() in chrome/browser/prefs/browser_prefs.cc | 24 // See chrome::RegisterProfilePrefs() in chrome/browser/prefs/browser_prefs.cc |
| 24 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) { | 25 void RegisterPrefs(user_prefs::PrefRegistrySyncable* registry) { |
| 25 ExtensionPrefs::RegisterProfilePrefs(registry); | 26 ExtensionPrefs::RegisterProfilePrefs(registry); |
| 26 } | 27 } |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 return NULL; | 151 return NULL; |
| 151 } | 152 } |
| 152 | 153 |
| 153 ExtensionSystemProvider* | 154 ExtensionSystemProvider* |
| 154 ShellExtensionsBrowserClient::GetExtensionSystemFactory() { | 155 ShellExtensionsBrowserClient::GetExtensionSystemFactory() { |
| 155 return ShellExtensionSystemFactory::GetInstance(); | 156 return ShellExtensionSystemFactory::GetInstance(); |
| 156 } | 157 } |
| 157 | 158 |
| 158 void ShellExtensionsBrowserClient::RegisterExtensionFunctions( | 159 void ShellExtensionsBrowserClient::RegisterExtensionFunctions( |
| 159 ExtensionFunctionRegistry* registry) const { | 160 ExtensionFunctionRegistry* registry) const { |
| 160 // TODO(rockot): Remove this once we have enough APIs moved out of src/chrome | 161 extensions::core_api::GeneratedFunctionRegistry::RegisterAll(registry); |
|
Yoyo Zhou
2014/03/06 23:50:08
I agree, it's not ideally named right now. But I d
Ken Rockot(use gerrit already)
2014/03/07 00:06:36
Great, I think we have a quorum on this. Bug filed
| |
| 161 // See http://crbug.com/349042 | 162 // TODO(rockot): Remove dependency on src/chrome once we have some core APIs |
| 163 // moved out. See http://crbug.com/349042. | |
| 162 extensions::api::GeneratedFunctionRegistry::RegisterAll(registry); | 164 extensions::api::GeneratedFunctionRegistry::RegisterAll(registry); |
| 163 } | 165 } |
| 164 | 166 |
| 165 } // namespace extensions | 167 } // namespace extensions |
| OLD | NEW |