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

Unified Diff: apps/shell/common/shell_extensions_client.cc

Issue 183893041: Move sockets APIs out of src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename api targets Created 6 years, 9 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 | « apps/shell/common/shell_extensions_client.h ('k') | chrome/browser/extensions/api/socket/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell/common/shell_extensions_client.cc
diff --git a/apps/shell/common/shell_extensions_client.cc b/apps/shell/common/shell_extensions_client.cc
index 99a68fbb5c118c62eacc5c3767ead53307a855ea..efefb3706ff91d0b0dc227468eb511466e833150 100644
--- a/apps/shell/common/shell_extensions_client.cc
+++ b/apps/shell/common/shell_extensions_client.cc
@@ -5,9 +5,11 @@
#include "apps/shell/common/shell_extensions_client.h"
#include "base/logging.h"
+#include "chrome/common/extensions/api/generated_schemas.h"
#include "chrome/common/extensions/api/sockets/sockets_manifest_handler.h"
#include "chrome/common/extensions/features/base_feature_provider.h"
#include "chrome/common/extensions/permissions/chrome_api_permissions.h"
+#include "extensions/common/api/generated_schemas.h"
#include "extensions/common/common_manifest_handlers.h"
#include "extensions/common/manifest_handler.h"
#include "extensions/common/permissions/permission_message_provider.h"
@@ -148,4 +150,21 @@ bool ShellExtensionsClient::IsScriptableURL(const GURL& url,
return true;
}
+bool ShellExtensionsClient::IsAPISchemaGenerated(
+ const std::string& name) const {
+ // TODO(rockot): Remove dependency on src/chrome once we have some core APIs
+ // moved out. See http://crbug.com/349042.
+ return extensions::api::GeneratedSchemas::IsGenerated(name) ||
+ extensions::core_api::GeneratedSchemas::IsGenerated(name);
+}
+
+base::StringPiece ShellExtensionsClient::GetAPISchema(
+ const std::string& name) const {
+ // TODO(rockot): Remove dependency on src/chrome once we have some core APIs
+ // moved out. See http://crbug.com/349042.
+ if (extensions::api::GeneratedSchemas::IsGenerated(name))
+ return extensions::api::GeneratedSchemas::Get(name);
+ return extensions::core_api::GeneratedSchemas::Get(name);
+}
+
} // namespace apps
« no previous file with comments | « apps/shell/common/shell_extensions_client.h ('k') | chrome/browser/extensions/api/socket/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698