Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (53 sloc) 2.221 kb
// Copyright (c) 2012 Intel Corp
// Copyright (c) 2012 The Chromium Authors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell co
// pies of the Software, and to permit persons to whom the Software is furnished
// to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in al
// l copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IM
// PLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNES
// S FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WH
// ETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "content/nw/src/api/window/window.h"
#include "base/values.h"
#include "content/nw/src/shell.h"
#include "content/nw/src/api/dispatcher_host.h"
namespace api {
Window::Window(int id,
DispatcherHost* dispatcher_host,
const base::DictionaryValue& option)
: Base(id, dispatcher_host, option),
shell_(content::Shell::FromRenderViewHost(dispatcher_host->
render_view_host())) {
}
Window::~Window() {
}
void Window::Call(const std::string& method,
const base::ListValue& arguments) {
if (method == "Show") {
shell_->Show();
} else if (method == "Hide") {
shell_->Hide();
} else if (method == "Maximize") {
shell_->Maximize();
} else if (method == "Unmaximize") {
shell_->Unmaximize();
} else if (method == "Minimize") {
shell_->Minimize();
} else if (method == "Restore") {
shell_->Restore();
} else {
NOTREACHED() << "Invalid call to Clipboard method:" << method
<< " arguments:" << arguments;
}
}
} // namespace api
Jump to Line
Something went wrong with that request. Please try again.