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

Side by Side Diff: ash/common/wm/window_cycle_controller.cc

Issue 2157393002: Moves WindowCycleList/Controller to ash/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Feedback and std::move Created 4 years, 5 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
« no previous file with comments | « ash/common/wm/window_cycle_controller.h ('k') | ash/common/wm/window_cycle_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/wm/window_cycle_controller.h" 5 #include "ash/common/wm/window_cycle_controller.h"
6 6
7 #include "ash/common/metrics/task_switch_source.h" 7 #include "ash/common/metrics/task_switch_source.h"
8 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
9 #include "ash/common/wm/mru_window_tracker.h" 9 #include "ash/common/wm/mru_window_tracker.h"
10 #include "ash/common/wm/window_cycle_event_filter.h" 10 #include "ash/common/wm/window_cycle_event_filter.h"
11 #include "ash/common/wm/window_cycle_list.h"
11 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
12 #include "ash/shell.h"
13 #include "ash/wm/window_cycle_list.h"
14 #include "base/metrics/histogram.h" 13 #include "base/metrics/histogram.h"
15 14
16 namespace ash { 15 namespace ash {
17 16
18 namespace { 17 namespace {
19 18
20 // Returns the most recently active window from the |window_list| or nullptr 19 // Returns the most recently active window from the |window_list| or nullptr
21 // if the list is empty. 20 // if the list is empty.
22 WmWindow* GetActiveWindow(const MruWindowTracker::WindowList& window_list) { 21 WmWindow* GetActiveWindow(const MruWindowTracker::WindowList& window_list) {
23 return window_list.empty() ? nullptr : window_list[0]; 22 return window_list.empty() ? nullptr : window_list[0];
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 86
88 if (active_window_after_window_cycle != nullptr && 87 if (active_window_after_window_cycle != nullptr &&
89 active_window_before_window_cycle_ != active_window_after_window_cycle) { 88 active_window_before_window_cycle_ != active_window_after_window_cycle) {
90 WmShell::Get()->RecordTaskSwitchMetric( 89 WmShell::Get()->RecordTaskSwitchMetric(
91 TaskSwitchSource::WINDOW_CYCLE_CONTROLLER); 90 TaskSwitchSource::WINDOW_CYCLE_CONTROLLER);
92 } 91 }
93 active_window_before_window_cycle_ = nullptr; 92 active_window_before_window_cycle_ = nullptr;
94 } 93 }
95 94
96 } // namespace ash 95 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/window_cycle_controller.h ('k') | ash/common/wm/window_cycle_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698