OLD | NEW |
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/wm/window_cycle_controller.h" |
6 | 6 |
7 #include "ash/metrics/task_switch_source.h" | 7 #include "ash/metrics/task_switch_source.h" |
8 #include "ash/public/cpp/shell_window_ids.h" | 8 #include "ash/public/cpp/shell_window_ids.h" |
9 #include "ash/session/session_controller.h" | 9 #include "ash/session/session_controller.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
11 #include "ash/shell_port.h" | 11 #include "ash/shell_port.h" |
12 #include "ash/wm/mru_window_tracker.h" | 12 #include "ash/wm/mru_window_tracker.h" |
13 #include "ash/wm/screen_pinning_controller.h" | 13 #include "ash/wm/screen_pinning_controller.h" |
14 #include "ash/wm/window_cycle_event_filter.h" | 14 #include "ash/wm/window_cycle_event_filter.h" |
15 #include "ash/wm/window_cycle_list.h" | 15 #include "ash/wm/window_cycle_list.h" |
16 #include "ash/wm/window_state.h" | 16 #include "ash/wm/window_state.h" |
17 #include "ash/wm/window_state_aura.h" | |
18 #include "ash/wm_window.h" | 17 #include "ash/wm_window.h" |
19 #include "base/metrics/histogram_macros.h" | 18 #include "base/metrics/histogram_macros.h" |
20 | 19 |
21 namespace ash { | 20 namespace ash { |
22 | 21 |
23 namespace { | 22 namespace { |
24 | 23 |
25 // Returns the most recently active window from the |window_list| or nullptr | 24 // Returns the most recently active window from the |window_list| or nullptr |
26 // if the list is empty. | 25 // if the list is empty. |
27 aura::Window* GetActiveWindow(const WindowCycleList::WindowList& window_list) { | 26 aura::Window* GetActiveWindow(const WindowCycleList::WindowList& window_list) { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 120 |
122 if (active_window_after_window_cycle != nullptr && | 121 if (active_window_after_window_cycle != nullptr && |
123 active_window_before_window_cycle_ != active_window_after_window_cycle) { | 122 active_window_before_window_cycle_ != active_window_after_window_cycle) { |
124 ShellPort::Get()->RecordTaskSwitchMetric( | 123 ShellPort::Get()->RecordTaskSwitchMetric( |
125 TaskSwitchSource::WINDOW_CYCLE_CONTROLLER); | 124 TaskSwitchSource::WINDOW_CYCLE_CONTROLLER); |
126 } | 125 } |
127 active_window_before_window_cycle_ = nullptr; | 126 active_window_before_window_cycle_ = nullptr; |
128 } | 127 } |
129 | 128 |
130 } // namespace ash | 129 } // namespace ash |
OLD | NEW |