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

Unified Diff: chrome/browser/extensions/api/app_window/app_window_api.cc

Issue 11362003: Make app windows restore position even if bounds are explicitly specified. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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: chrome/browser/extensions/api/app_window/app_window_api.cc
diff --git a/chrome/browser/extensions/api/app_window/app_window_api.cc b/chrome/browser/extensions/api/app_window/app_window_api.cc
index 2bed9f500d9b5babe969c3658015476cf1ceae03..2d41e66c0dbb58a812b8a9b3ecfe4325a8221744 100644
--- a/chrome/browser/extensions/api/app_window/app_window_api.cc
+++ b/chrome/browser/extensions/api/app_window/app_window_api.cc
@@ -112,6 +112,8 @@ bool AppWindowCreateFunction::RunImpl() {
create_params.window_key = *options->id;
}
+ // TODO(jeremya): remove these, since they do the same thing as
+ // left/top/width/height.
if (options->default_width.get())
create_params.bounds.set_width(*options->default_width.get());
if (options->default_height.get())
@@ -121,13 +123,11 @@ bool AppWindowCreateFunction::RunImpl() {
if (options->default_top.get())
create_params.bounds.set_y(*options->default_top.get());
-
if (options->width.get() || options->height.get()) {
Marijn Kruisselbrink 2012/11/12 17:56:51 nit: With the restore_size bit gone, there is no r
if (options->width.get())
create_params.bounds.set_width(*options->width.get());
if (options->height.get())
create_params.bounds.set_height(*options->height.get());
- create_params.restore_size = false;
}
if (options->left.get() || options->top.get()) {
Marijn Kruisselbrink 2012/11/12 17:56:51 same here, this outer if no longer has a purpose
@@ -135,7 +135,6 @@ bool AppWindowCreateFunction::RunImpl() {
create_params.bounds.set_x(*options->left.get());
if (options->top.get())
create_params.bounds.set_y(*options->top.get());
- create_params.restore_position = false;
}
if (options->frame.get()) {
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/shell_window.h » ('j') | chrome/common/extensions/api/app_window.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698