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

Unified Diff: apps/shell/browser/api/shell/shell_api.cc

Issue 254473011: Introduce chrome.shell.createWindow stub API for app_shell (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix deps (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
« no previous file with comments | « apps/shell/browser/api/shell/shell_api.h ('k') | apps/shell/browser/shell_extensions_browser_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/shell/browser/api/shell/shell_api.cc
diff --git a/apps/shell/browser/shell_app_window_api.cc b/apps/shell/browser/api/shell/shell_api.cc
similarity index 57%
copy from apps/shell/browser/shell_app_window_api.cc
copy to apps/shell/browser/api/shell/shell_api.cc
index 136a0ce87703beca5a2afb847fe4dde8f141f36b..929d1db531faecb63843cdd16b992a95fe3f3b51 100644
--- a/apps/shell/browser/shell_app_window_api.cc
+++ b/apps/shell/browser/api/shell/shell_api.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "apps/shell/browser/shell_app_window_api.h"
+#include "apps/shell/browser/api/shell/shell_api.h"
#include "apps/shell/browser/shell_app_window.h"
#include "apps/shell/browser/shell_desktop_controller.h"
@@ -10,48 +10,27 @@
using base::DictionaryValue;
-namespace extensions {
+namespace apps {
namespace {
-// Returns stub values for window bounds.
-DictionaryValue* CreateStubBoundsProperties() {
- DictionaryValue* properties = new DictionaryValue;
- properties->SetInteger("left", 0);
- properties->SetInteger("top", 0);
- properties->SetInteger("width", 0);
- properties->SetInteger("height", 0);
- return properties;
-}
-
// Creates a function call result to send to the renderer.
DictionaryValue* CreateResult(apps::ShellAppWindow* app_window) {
int view_id = app_window->GetRenderViewRoutingID();
DictionaryValue* result = new DictionaryValue;
result->Set("viewId", new base::FundamentalValue(view_id));
- result->Set("injectTitlebar", new base::FundamentalValue(false));
- result->Set("id", new base::StringValue("app_shell"));
-
- // Add stub window property data.
- result->SetBoolean("fullscreen", true);
- result->SetBoolean("minimized", false);
- result->SetBoolean("maximized", false);
- result->SetBoolean("alwaysOnTop", false);
- result->SetBoolean("hasFrameColor", false);
- result->SetInteger("frameColor", 0);
- result->Set("innerBounds", CreateStubBoundsProperties());
- result->Set("outerBounds", CreateStubBoundsProperties());
-
return result;
}
} // namespace
-ShellAppWindowCreateFunction::ShellAppWindowCreateFunction() {}
+ShellCreateWindowFunction::ShellCreateWindowFunction() {
+}
-ShellAppWindowCreateFunction::~ShellAppWindowCreateFunction() {}
+ShellCreateWindowFunction::~ShellCreateWindowFunction() {
+}
-bool ShellAppWindowCreateFunction::RunImpl() {
+bool ShellCreateWindowFunction::RunImpl() {
// Arguments must contain a URL and may contain options and a callback.
if (args_->GetSize() < 1 || args_->GetSize() > 3)
return false;
@@ -80,4 +59,4 @@ bool ShellAppWindowCreateFunction::RunImpl() {
return true;
}
-} // namespace extensions
+} // namespace apps
« no previous file with comments | « apps/shell/browser/api/shell/shell_api.h ('k') | apps/shell/browser/shell_extensions_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698