| 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 "chrome/browser/extensions/chrome_extensions_browser_client.h" | 5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" |
| 6 | 6 |
| 7 #include "apps/common/api/generated_api.h" | 7 #include "apps/common/api/generated_api.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/version.h" | 9 #include "base/version.h" |
| 10 #include "chrome/browser/app_mode/app_mode_utils.h" | 10 #include "chrome/browser/app_mode/app_mode_utils.h" |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 ChromeExtensionsBrowserClient::GetExtensionSystemFactory() { | 210 ChromeExtensionsBrowserClient::GetExtensionSystemFactory() { |
| 211 return ExtensionSystemFactory::GetInstance(); | 211 return ExtensionSystemFactory::GetInstance(); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void ChromeExtensionsBrowserClient::RegisterExtensionFunctions( | 214 void ChromeExtensionsBrowserClient::RegisterExtensionFunctions( |
| 215 ExtensionFunctionRegistry* registry) const { | 215 ExtensionFunctionRegistry* registry) const { |
| 216 // TODO(rockot): Figure out if and why Android really needs to build | 216 // TODO(rockot): Figure out if and why Android really needs to build |
| 217 // ChromeExtensionsBrowserClient and refactor so this ifdef isn't necessary. | 217 // ChromeExtensionsBrowserClient and refactor so this ifdef isn't necessary. |
| 218 // See http://crbug.com/349436 | 218 // See http://crbug.com/349436 |
| 219 #if defined(ENABLE_EXTENSIONS) | 219 #if defined(ENABLE_EXTENSIONS) |
| 220 // WebRequest. | |
| 221 registry->RegisterFunction<WebRequestAddEventListener>(); | |
| 222 registry->RegisterFunction<WebRequestEventHandled>(); | |
| 223 | |
| 224 // Preferences. | 220 // Preferences. |
| 225 registry->RegisterFunction<extensions::GetPreferenceFunction>(); | 221 registry->RegisterFunction<extensions::GetPreferenceFunction>(); |
| 226 registry->RegisterFunction<extensions::SetPreferenceFunction>(); | 222 registry->RegisterFunction<extensions::SetPreferenceFunction>(); |
| 227 registry->RegisterFunction<extensions::ClearPreferenceFunction>(); | 223 registry->RegisterFunction<extensions::ClearPreferenceFunction>(); |
| 228 | 224 |
| 229 // Direct Preference Access for Component Extensions. | 225 // Direct Preference Access for Component Extensions. |
| 230 registry->RegisterFunction< | 226 registry->RegisterFunction< |
| 231 extensions::chromedirectsetting::GetDirectSettingFunction>(); | 227 extensions::chromedirectsetting::GetDirectSettingFunction>(); |
| 232 registry->RegisterFunction< | 228 registry->RegisterFunction< |
| 233 extensions::chromedirectsetting::SetDirectSettingFunction>(); | 229 extensions::chromedirectsetting::SetDirectSettingFunction>(); |
| 234 registry->RegisterFunction< | 230 registry->RegisterFunction< |
| 235 extensions::chromedirectsetting::ClearDirectSettingFunction>(); | 231 extensions::chromedirectsetting::ClearDirectSettingFunction>(); |
| 236 | 232 |
| 237 // Generated APIs from lower-level modules. | 233 // Generated APIs from lower-level modules. |
| 238 extensions::core_api::GeneratedFunctionRegistry::RegisterAll(registry); | 234 extensions::core_api::GeneratedFunctionRegistry::RegisterAll(registry); |
| 239 apps::api::GeneratedFunctionRegistry::RegisterAll(registry); | 235 apps::api::GeneratedFunctionRegistry::RegisterAll(registry); |
| 240 | 236 |
| 241 // Generated APIs from Chrome. | 237 // Generated APIs from Chrome. |
| 242 extensions::api::GeneratedFunctionRegistry::RegisterAll(registry); | 238 extensions::api::GeneratedFunctionRegistry::RegisterAll(registry); |
| 243 #endif | 239 #endif |
| 244 } | 240 } |
| 245 | 241 |
| 246 } // namespace extensions | 242 } // namespace extensions |
| OLD | NEW |