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

Unified Diff: chrome/browser/ui/extensions/shell_window.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 | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/common/extensions/api/app_window.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/shell_window.cc
diff --git a/chrome/browser/ui/extensions/shell_window.cc b/chrome/browser/ui/extensions/shell_window.cc
index 2c4e5a7a2777346692da0def1c592c7362d77924..46e709f5dbe6304691a37f31920e8cd4107b8eba 100644
--- a/chrome/browser/ui/extensions/shell_window.cc
+++ b/chrome/browser/ui/extensions/shell_window.cc
@@ -76,7 +76,6 @@ void SuspendRenderViewHost(RenderViewHost* rvh) {
ShellWindow::CreateParams::CreateParams()
: frame(ShellWindow::CreateParams::FRAME_CHROME),
bounds(INT_MIN, INT_MIN, INT_MIN, INT_MIN),
- restore_position(true), restore_size(true),
creator_process_id(0), hidden(false) {
}
@@ -133,19 +132,13 @@ void ShellWindow::Init(const GURL& url,
if (!params.window_key.empty()) {
window_key_ = params.window_key;
- if (params.restore_position || params.restore_size) {
- extensions::ShellWindowGeometryCache* cache =
- extensions::ExtensionSystem::Get(profile())->
- shell_window_geometry_cache();
- gfx::Rect cached_bounds;
- if (cache->GetGeometry(extension()->id(), params.window_key,
- &cached_bounds)) {
- if (params.restore_position)
- bounds.set_origin(cached_bounds.origin());
- if (params.restore_size)
- bounds.set_size(cached_bounds.size());
- }
- }
+ extensions::ShellWindowGeometryCache* cache =
+ extensions::ExtensionSystem::Get(profile())->
+ shell_window_geometry_cache();
+ gfx::Rect cached_bounds;
+ if (cache->GetGeometry(extension()->id(), params.window_key,
+ &cached_bounds))
+ bounds = cached_bounds;
}
ShellWindow::CreateParams new_params = params;
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/common/extensions/api/app_window.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698