| 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
|
|
|