diff options
author | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 16:15:00 +0000 |
---|---|---|
committer | jamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-08 16:15:00 +0000 |
commit | c7c003e0c179cf21718c1183da630990e5d3c82e (patch) | |
tree | f67a120e78ae4c19b9a022651ef1573202db7726 /ash | |
parent | 80593d0596727885942d682da20ad18ae1de2390 (diff) | |
download | chromium_src-c7c003e0c179cf21718c1183da630990e5d3c82e.zip chromium_src-c7c003e0c179cf21718c1183da630990e5d3c82e.tar.gz chromium_src-c7c003e0c179cf21718c1183da630990e5d3c82e.tar.bz2 |
Fix --aura-window-mode=compact on dev linux_chromeos builds
BUG=none
TEST=manual
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120887
Speculatively reverted at https://src.chromium.org/viewvc/chrome?view=rev&revision=120931
Review URL: https://chromiumcodereview.appspot.com/9363009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120986 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/shell.cc | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/ash/shell.cc b/ash/shell.cc index 945c671..0e2c11e 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -70,11 +70,6 @@ const int kCompactWindowModeWidthThreshold = 1366; // Returns suggested window mode for a given monitor size. Shell::WindowMode SuggestedWindowMode(const gfx::Size& monitor_size) { - // Developers often run the Aura shell in small windows on their desktop. - // Prefer overlapping mode for them. - if (!aura::RootWindow::use_fullscreen_host_window()) - return Shell::MODE_OVERLAPPING; - // If the screen is narrow we prefer a single compact window display. // We explicitly don't care about height, since users don't generally stack // browser windows vertically. @@ -378,6 +373,11 @@ Shell::WindowMode Shell::ComputeWindowMode(const gfx::Size& monitor_size, return MODE_OVERLAPPING; } + // Developers often run the Aura shell in small windows on their desktop. + // Prefer overlapping mode for them. + if (!aura::RootWindow::use_fullscreen_host_window()) + return Shell::MODE_OVERLAPPING; + // Without an explicit command line flag, guess based on the monitor size. return SuggestedWindowMode(monitor_size); } @@ -435,6 +435,11 @@ void Shell::SetWindowModeForMonitorSize(const gfx::Size& monitor_size) { if (command_line->HasSwitch(switches::kAuraForceCompactWindowMode)) return; + // Developers often run the Aura shell in small windows on their desktop. + // Don't change modes if they resize the host window. + if (!aura::RootWindow::use_fullscreen_host_window()) + return; + // If we're running on a device, a resolution change means the user plugged in // or unplugged an external monitor. Change window mode to be appropriate for // the new screen resolution. |