| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |