Modify Window API to be more consistent.

* '_' becomes '-'
* removes 'position' field
* adds 'center' method.
This commit is contained in:
Cheng Zhao 2013-05-10 20:34:05 +08:00
parent e6a9add691
commit 34e9132b68
8 changed files with 30 additions and 24 deletions

View file

@ -77,15 +77,15 @@ NativeWindow* NativeWindow::FromRenderView(int process_id, int routing_id) {
void NativeWindow::InitFromOptions(base::DictionaryValue* options) {
// Setup window from options.
int x, y;
std::string position;
bool center;
if (options->GetInteger(switches::kX, &x) &&
options->GetInteger(switches::kY, &y)) {
int width, height;
options->GetInteger(switches::kWidth, &width);
options->GetInteger(switches::kHeight, &height);
Move(gfx::Rect(x, y, width, height));
} else if (options->GetString(switches::kPosition, &position)) {
SetPosition(position);
} else if (options->GetBoolean(switches::kCenter, &center) && center) {
Center();
}
int min_height, min_width;
if (options->GetInteger(switches::kMinHeight, &min_height) &&
@ -124,7 +124,7 @@ void NativeWindow::InitFromOptions(base::DictionaryValue* options) {
Show();
}
void NativeWindow::ShowDevTools() {
void NativeWindow::OpenDevTools() {
inspectable_web_contents()->ShowDevTools();
}