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

Unified Diff: ash/wm/overview/window_selector_controller.cc

Issue 23534041: Enable overview mode by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't cycle with no windows. Created 7 years, 3 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/ash_switches.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_selector_controller.cc
diff --git a/ash/wm/overview/window_selector_controller.cc b/ash/wm/overview/window_selector_controller.cc
index 84c83d20699bf03cb275916c02a83a29a8ba6431..f9839dcb43a7669f5ad66334d5821abc65cf33ef 100644
--- a/ash/wm/overview/window_selector_controller.cc
+++ b/ash/wm/overview/window_selector_controller.cc
@@ -50,6 +50,10 @@ void WindowSelectorController::HandleCycleWindow(
if (!IsSelecting()) {
std::vector<aura::Window*> windows = ash::Shell::GetInstance()->
mru_window_tracker()->BuildMruWindowList();
+ // Don't cycle with no windows.
+ if (windows.empty())
+ return;
+
// Removing focus will hide popup windows like the omnibar or open menus.
window_selector_.reset(
new WindowSelector(windows, WindowSelector::CYCLE, this));
« no previous file with comments | « ash/ash_switches.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698