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/common/extensions/chrome_extensions_client.h" | 5 #include "chrome/common/extensions/chrome_extensions_client.h" |
6 | 6 |
7 #include "chrome/common/chrome_version_info.h" | 7 #include "chrome/common/chrome_version_info.h" |
8 #include "chrome/common/extensions/api/generated_schemas.h" | 8 #include "chrome/common/extensions/api/generated_schemas.h" |
9 #include "chrome/common/extensions/chrome_manifest_handlers.h" | 9 #include "chrome/common/extensions/chrome_manifest_handlers.h" |
10 #include "chrome/common/extensions/extension_constants.h" | 10 #include "chrome/common/extensions/extension_constants.h" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 api->RegisterSchemaResource("commands", IDR_EXTENSION_API_JSON_COMMANDS); | 240 api->RegisterSchemaResource("commands", IDR_EXTENSION_API_JSON_COMMANDS); |
241 api->RegisterSchemaResource("declarativeContent", | 241 api->RegisterSchemaResource("declarativeContent", |
242 IDR_EXTENSION_API_JSON_DECLARATIVE_CONTENT); | 242 IDR_EXTENSION_API_JSON_DECLARATIVE_CONTENT); |
243 api->RegisterSchemaResource("declarativeWebRequest", | 243 api->RegisterSchemaResource("declarativeWebRequest", |
244 IDR_EXTENSION_API_JSON_DECLARATIVE_WEBREQUEST); | 244 IDR_EXTENSION_API_JSON_DECLARATIVE_WEBREQUEST); |
245 api->RegisterSchemaResource("fileBrowserHandler", | 245 api->RegisterSchemaResource("fileBrowserHandler", |
246 IDR_EXTENSION_API_JSON_FILEBROWSERHANDLER); | 246 IDR_EXTENSION_API_JSON_FILEBROWSERHANDLER); |
247 api->RegisterSchemaResource("inputMethodPrivate", | 247 api->RegisterSchemaResource("inputMethodPrivate", |
248 IDR_EXTENSION_API_JSON_INPUTMETHODPRIVATE); | 248 IDR_EXTENSION_API_JSON_INPUTMETHODPRIVATE); |
249 api->RegisterSchemaResource("pageAction", IDR_EXTENSION_API_JSON_PAGEACTION); | 249 api->RegisterSchemaResource("pageAction", IDR_EXTENSION_API_JSON_PAGEACTION); |
250 api->RegisterSchemaResource("pageActions", | |
251 IDR_EXTENSION_API_JSON_PAGEACTIONS); | |
252 api->RegisterSchemaResource("privacy", IDR_EXTENSION_API_JSON_PRIVACY); | 250 api->RegisterSchemaResource("privacy", IDR_EXTENSION_API_JSON_PRIVACY); |
253 api->RegisterSchemaResource("processes", IDR_EXTENSION_API_JSON_PROCESSES); | 251 api->RegisterSchemaResource("processes", IDR_EXTENSION_API_JSON_PROCESSES); |
254 api->RegisterSchemaResource("proxy", IDR_EXTENSION_API_JSON_PROXY); | 252 api->RegisterSchemaResource("proxy", IDR_EXTENSION_API_JSON_PROXY); |
255 api->RegisterSchemaResource("scriptBadge", | 253 api->RegisterSchemaResource("scriptBadge", |
256 IDR_EXTENSION_API_JSON_SCRIPTBADGE); | 254 IDR_EXTENSION_API_JSON_SCRIPTBADGE); |
257 api->RegisterSchemaResource("ttsEngine", IDR_EXTENSION_API_JSON_TTSENGINE); | 255 api->RegisterSchemaResource("ttsEngine", IDR_EXTENSION_API_JSON_TTSENGINE); |
258 api->RegisterSchemaResource("tts", IDR_EXTENSION_API_JSON_TTS); | 256 api->RegisterSchemaResource("tts", IDR_EXTENSION_API_JSON_TTS); |
259 api->RegisterSchemaResource("types", IDR_EXTENSION_API_JSON_TYPES); | 257 api->RegisterSchemaResource("types", IDR_EXTENSION_API_JSON_TYPES); |
260 api->RegisterSchemaResource("types.private", | 258 api->RegisterSchemaResource("types.private", |
261 IDR_EXTENSION_API_JSON_TYPES_PRIVATE); | 259 IDR_EXTENSION_API_JSON_TYPES_PRIVATE); |
262 api->RegisterSchemaResource("webstore", IDR_EXTENSION_API_JSON_WEBSTORE); | 260 api->RegisterSchemaResource("webstore", IDR_EXTENSION_API_JSON_WEBSTORE); |
263 api->RegisterSchemaResource("webViewRequest", | 261 api->RegisterSchemaResource("webViewRequest", |
264 IDR_EXTENSION_API_JSON_WEB_VIEW_REQUEST); | 262 IDR_EXTENSION_API_JSON_WEB_VIEW_REQUEST); |
265 #endif // defined(ENABLE_EXTENSIONS) | 263 #endif // defined(ENABLE_EXTENSIONS) |
266 } | 264 } |
267 | 265 |
268 bool ChromeExtensionsClient::ShouldSuppressFatalErrors() const { | 266 bool ChromeExtensionsClient::ShouldSuppressFatalErrors() const { |
269 // Suppress fatal errors only on beta and stable channels. | 267 // Suppress fatal errors only on beta and stable channels. |
270 return GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV; | 268 return GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV; |
271 } | 269 } |
272 | 270 |
273 // static | 271 // static |
274 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { | 272 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { |
275 return g_client.Pointer(); | 273 return g_client.Pointer(); |
276 } | 274 } |
277 | 275 |
278 } // namespace extensions | 276 } // namespace extensions |
OLD | NEW |