Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Unified Diff: chrome/common/extensions/chrome_extensions_client.cc

Issue 296133011: Move extension API schema registration to ExtensionsClient. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ifdefs =( Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/chrome_extensions_client.h ('k') | extensions/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/chrome_extensions_client.cc
diff --git a/chrome/common/extensions/chrome_extensions_client.cc b/chrome/common/extensions/chrome_extensions_client.cc
index 7e0f0eb4ac6f3f12c03baa43803118c87407f1ed..cd58fb8053527a1db2bb729bf0219e5ca13e2acf 100644
--- a/chrome/common/extensions/chrome_extensions_client.cc
+++ b/chrome/common/extensions/chrome_extensions_client.cc
@@ -17,6 +17,7 @@
#include "extensions/common/api/generated_schemas.h"
#include "extensions/common/common_manifest_handlers.h"
#include "extensions/common/extension.h"
+#include "extensions/common/extension_api.h"
#include "extensions/common/features/api_feature.h"
#include "extensions/common/features/base_feature_provider.h"
#include "extensions/common/features/feature_provider.h"
@@ -33,6 +34,9 @@
#include "extensions/common/url_pattern.h"
#include "extensions/common/url_pattern_set.h"
#include "grit/common_resources.h"
+#if defined(ENABLE_EXTENSIONS)
+#include "grit/extensions_api_resources.h"
+#endif
#include "grit/extensions_resources.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -231,6 +235,42 @@ base::StringPiece ChromeExtensionsClient::GetAPISchema(
return apps::api::GeneratedSchemas::Get(name);
}
+void ChromeExtensionsClient::RegisterAPISchemaResources(
+ ExtensionAPI* api) const {
+#if defined(ENABLE_EXTENSIONS)
+ api->RegisterSchemaResource("accessibilityPrivate",
+ IDR_EXTENSION_API_JSON_ACCESSIBILITYPRIVATE);
+ api->RegisterSchemaResource("app", IDR_EXTENSION_API_JSON_APP);
+ api->RegisterSchemaResource("browserAction",
+ IDR_EXTENSION_API_JSON_BROWSERACTION);
+ api->RegisterSchemaResource("commands", IDR_EXTENSION_API_JSON_COMMANDS);
+ api->RegisterSchemaResource("declarativeContent",
+ IDR_EXTENSION_API_JSON_DECLARATIVE_CONTENT);
+ api->RegisterSchemaResource("declarativeWebRequest",
+ IDR_EXTENSION_API_JSON_DECLARATIVE_WEBREQUEST);
+ api->RegisterSchemaResource("fileBrowserHandler",
+ IDR_EXTENSION_API_JSON_FILEBROWSERHANDLER);
+ api->RegisterSchemaResource("inputMethodPrivate",
+ IDR_EXTENSION_API_JSON_INPUTMETHODPRIVATE);
+ api->RegisterSchemaResource("pageAction", IDR_EXTENSION_API_JSON_PAGEACTION);
+ api->RegisterSchemaResource("pageActions",
+ IDR_EXTENSION_API_JSON_PAGEACTIONS);
+ api->RegisterSchemaResource("privacy", IDR_EXTENSION_API_JSON_PRIVACY);
+ api->RegisterSchemaResource("processes", IDR_EXTENSION_API_JSON_PROCESSES);
+ api->RegisterSchemaResource("proxy", IDR_EXTENSION_API_JSON_PROXY);
+ api->RegisterSchemaResource("scriptBadge",
+ IDR_EXTENSION_API_JSON_SCRIPTBADGE);
+ api->RegisterSchemaResource("ttsEngine", IDR_EXTENSION_API_JSON_TTSENGINE);
+ api->RegisterSchemaResource("tts", IDR_EXTENSION_API_JSON_TTS);
+ api->RegisterSchemaResource("types", IDR_EXTENSION_API_JSON_TYPES);
+ api->RegisterSchemaResource("types.private",
+ IDR_EXTENSION_API_JSON_TYPES_PRIVATE);
+ api->RegisterSchemaResource("webstore", IDR_EXTENSION_API_JSON_WEBSTORE);
+ api->RegisterSchemaResource("webViewRequest",
+ IDR_EXTENSION_API_JSON_WEBVIEW_REQUEST);
+#endif // defined(ENABLE_EXTENSIONS)
+}
+
bool ChromeExtensionsClient::ShouldSuppressFatalErrors() const {
// <= dev means dev, canary, and trunk.
return GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV;
« no previous file with comments | « chrome/common/extensions/chrome_extensions_client.h ('k') | extensions/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698