summaryrefslogtreecommitdiffstats
path: root/ui/aura/desktop.cc
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-29 21:26:20 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-29 21:26:20 +0000
commite6f038435c8c56d77b98ee1f9f378d888f3793dc (patch)
treee621bbaba484926da62142d5ed63b0a2567d0005 /ui/aura/desktop.cc
parent6ca4dc81bd632c79de0da9ee0e426df3b0e8c0a4 (diff)
downloadchromium_src-e6f038435c8c56d77b98ee1f9f378d888f3793dc.zip
chromium_src-e6f038435c8c56d77b98ee1f9f378d888f3793dc.tar.gz
chromium_src-e6f038435c8c56d77b98ee1f9f378d888f3793dc.tar.bz2
aura: Handle screen resizes on Chrome OS.
The desktop host window's bounds are set to cover the entire display at startup on Chrome OS. This change makes us watch for resolution changes and update the bounds accordingly. BUG=105562 TEST=manual: ran it on a chrome os device, switched between 1024x768 and 1280x800, and checked that the host window was resized accordingly Review URL: http://codereview.chromium.org/8727013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@112028 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/desktop.cc')
-rw-r--r--ui/aura/desktop.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/aura/desktop.cc b/ui/aura/desktop.cc
index 90ee171..59cd962 100644
--- a/ui/aura/desktop.cc
+++ b/ui/aura/desktop.cc
@@ -242,6 +242,11 @@ void Desktop::OnHostResized(const gfx::Size& size) {
OnDesktopResized(bounds.size()));
}
+void Desktop::OnNativeScreenResized(const gfx::Size& size) {
+ if (use_fullscreen_host_window_)
+ SetHostSize(size);
+}
+
void Desktop::SetActiveWindow(Window* window, Window* to_focus) {
if (!window)
return;
@@ -602,7 +607,7 @@ gfx::Rect Desktop::GetInitialHostWindowBounds() const {
base::StringToInt(parts[1], &parsed_height) && parsed_height > 0) {
bounds.set_size(gfx::Size(parsed_width, parsed_height));
} else if (use_fullscreen_host_window_) {
- bounds = gfx::Rect(DesktopHost::GetNativeDisplaySize());
+ bounds = gfx::Rect(DesktopHost::GetNativeScreenSize());
}
return bounds;