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

Side by Side Diff: ash/common/wm/overview/window_selector_controller.cc

Issue 2273103003: [ash-md] Cancels overview mode before switching user profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [ash-md] Cancels overview mode before switching user profiles (nit) Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/common/wm/overview/window_selector_controller.h" 5 #include "ash/common/wm/overview/window_selector_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/system/tray/system_tray_delegate.h" 10 #include "ash/common/system/tray/system_tray_delegate.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 if (windows.empty()) 61 if (windows.empty())
62 return; 62 return;
63 63
64 WmShell::Get()->OnOverviewModeStarting(); 64 WmShell::Get()->OnOverviewModeStarting();
65 window_selector_.reset(new WindowSelector(this)); 65 window_selector_.reset(new WindowSelector(this));
66 window_selector_->Init(windows); 66 window_selector_->Init(windows);
67 OnSelectionStarted(); 67 OnSelectionStarted();
68 } 68 }
69 } 69 }
70 70
71 bool WindowSelectorController::IsSelecting() { 71 bool WindowSelectorController::IsSelecting() const {
72 return window_selector_.get() != NULL; 72 return window_selector_.get() != NULL;
73 } 73 }
74 74
75 bool WindowSelectorController::IsRestoringMinimizedWindows() const { 75 bool WindowSelectorController::IsRestoringMinimizedWindows() const {
76 return window_selector_.get() != NULL && 76 return window_selector_.get() != NULL &&
77 window_selector_->restoring_minimized_windows(); 77 window_selector_->restoring_minimized_windows();
78 } 78 }
79 79
80 // TODO(flackr): Make WindowSelectorController observe the activation of 80 // TODO(flackr): Make WindowSelectorController observe the activation of
81 // windows, so we can remove WindowSelectorDelegate. 81 // windows, so we can remove WindowSelectorDelegate.
(...skipping 30 matching lines...) Expand all
112 } 112 }
113 113
114 void WindowSelectorController::OnSelectionStarted() { 114 void WindowSelectorController::OnSelectionStarted() {
115 if (!last_selection_time_.is_null()) { 115 if (!last_selection_time_.is_null()) {
116 UMA_HISTOGRAM_LONG_TIMES("Ash.WindowSelector.TimeBetweenUse", 116 UMA_HISTOGRAM_LONG_TIMES("Ash.WindowSelector.TimeBetweenUse",
117 base::Time::Now() - last_selection_time_); 117 base::Time::Now() - last_selection_time_);
118 } 118 }
119 } 119 }
120 120
121 } // namespace ash 121 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/overview/window_selector_controller.h ('k') | chrome/browser/ui/ash/multi_user/user_switch_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698