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

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

Issue 254473011: Introduce chrome.shell.createWindow stub API for app_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (shell-api) Created 6 years, 8 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
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 bd1dc1ca061ac21f8a2d520de80f92f1ad6cc899..959464ca2994d4f5d9743df8345231c87860b288 100644
--- a/apps/shell/common/shell_extensions_client.cc
+++ b/apps/shell/common/shell_extensions_client.cc
@@ -4,6 +4,7 @@
#include "apps/shell/common/shell_extensions_client.h"
+#include "apps/shell/common/api/generated_schemas.h"
#include "apps/shell/common/shell_app_runtime.h"
#include "base/logging.h"
#include "chrome/common/extensions/api/generated_schemas.h"
@@ -192,6 +193,7 @@ bool ShellExtensionsClient::IsAPISchemaGenerated(
// have the Chrome app APIs available.
return extensions::api::GeneratedSchemas::IsGenerated(name) ||
extensions::core_api::GeneratedSchemas::IsGenerated(name) ||
+ apps::shell_api::GeneratedSchemas::IsGenerated(name) ||
name == extensions::ShellAppRuntime::GetName();
}
@@ -202,7 +204,12 @@ base::StringPiece ShellExtensionsClient::GetAPISchema(
if (extensions::api::GeneratedSchemas::IsGenerated(name))
return extensions::api::GeneratedSchemas::Get(name);
+ // Schema for chrome.shell APIs.
+ if (apps::shell_api::GeneratedSchemas::IsGenerated(name))
+ return apps::shell_api::GeneratedSchemas::Get(name);
+
// Special-case our simplified app.runtime implementation.
+ // TODO(jamescook): Move this into a chrome.shell.onLaunched() event.
if (name == extensions::ShellAppRuntime::GetName())
return extensions::ShellAppRuntime::GetSchema();

Powered by Google App Engine
This is Rietveld 408576698