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

Unified Diff: ash/wm/root_window_layout_manager.cc

Issue 9320076: Aura: Switch window mode when screen resolution changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works even if --aura-window-mode on cmd line Created 8 years, 10 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
« no previous file with comments | « ash/shell_unittest.cc ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/root_window_layout_manager.cc
diff --git a/ash/wm/root_window_layout_manager.cc b/ash/wm/root_window_layout_manager.cc
index 53af79118c7b1e3e03ad94ff3a996e1f043f833f..55acb162935ae4dc5fd6245530b0f49c20484850 100644
--- a/ash/wm/root_window_layout_manager.cc
+++ b/ash/wm/root_window_layout_manager.cc
@@ -4,6 +4,7 @@
#include "ash/wm/root_window_layout_manager.h"
+#include "ash/shell.h"
#include "ui/aura/window.h"
#include "ui/views/widget/widget.h"
@@ -36,6 +37,10 @@ void RootWindowLayoutManager::OnWindowResized() {
gfx::Rect fullscreen_bounds =
gfx::Rect(owner_->bounds().width(), owner_->bounds().height());
+ // Change window mode before setting bounds on children so the children will
+ // resize to fit the new workspace area.
+ Shell::GetInstance()->SetWindowModeForMonitorSize(fullscreen_bounds.size());
+
aura::Window::Windows::const_iterator i;
for (i = owner_->children().begin(); i != owner_->children().end(); ++i)
(*i)->SetBounds(fullscreen_bounds);
« no previous file with comments | « ash/shell_unittest.cc ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698