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

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: re-rebase Created 8 years, 1 month 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 | « no previous file | chrome/browser/ui/extensions/shell_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 32d83de92dd73bdffe183a5b71bcb463a9e0cf9e..6ac4b8179e72ffc29339a7fbb68133115e9c531b 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,22 +123,14 @@ bool AppWindowCreateFunction::RunImpl() {
if (options->default_top.get())
create_params.bounds.set_y(*options->default_top.get());
-
- if (options->width.get() || options->height.get()) {
- 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()) {
- if (options->left.get())
- 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->width.get())
+ create_params.bounds.set_width(*options->width.get());
+ if (options->height.get())
+ create_params.bounds.set_height(*options->height.get());
+ if (options->left.get())
+ create_params.bounds.set_x(*options->left.get());
+ if (options->top.get())
+ create_params.bounds.set_y(*options->top.get());
if (options->bounds.get()) {
app_window::Bounds* bounds = options->bounds.get();
« no previous file with comments | « no previous file | chrome/browser/ui/extensions/shell_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698