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

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

Issue 2430593002: mash: Use ash shell window container ids instead of ash::mojom::Container (Closed)
Patch Set: rebase Created 4 years, 2 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 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/common/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/shell_window_ids.h"
10 #include "ash/common/wm/mru_window_tracker.h" 9 #include "ash/common/wm/mru_window_tracker.h"
11 #include "ash/common/wm/window_cycle_event_filter.h" 10 #include "ash/common/wm/window_cycle_event_filter.h"
12 #include "ash/common/wm/window_cycle_list.h" 11 #include "ash/common/wm/window_cycle_list.h"
13 #include "ash/common/wm_shell.h" 12 #include "ash/common/wm_shell.h"
14 #include "ash/common/wm_window.h" 13 #include "ash/common/wm_window.h"
14 #include "ash/public/cpp/shell_window_ids.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
16 16
17 namespace ash { 17 namespace ash {
18 18
19 namespace { 19 namespace {
20 20
21 // Returns the most recently active window from the |window_list| or nullptr 21 // Returns the most recently active window from the |window_list| or nullptr
22 // if the list is empty. 22 // if the list is empty.
23 WmWindow* GetActiveWindow(const MruWindowTracker::WindowList& window_list) { 23 WmWindow* GetActiveWindow(const MruWindowTracker::WindowList& window_list) {
24 return window_list.empty() ? nullptr : window_list[0]; 24 return window_list.empty() ? nullptr : window_list[0];
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 if (active_window_after_window_cycle != nullptr && 102 if (active_window_after_window_cycle != nullptr &&
103 active_window_before_window_cycle_ != active_window_after_window_cycle) { 103 active_window_before_window_cycle_ != active_window_after_window_cycle) {
104 WmShell::Get()->RecordTaskSwitchMetric( 104 WmShell::Get()->RecordTaskSwitchMetric(
105 TaskSwitchSource::WINDOW_CYCLE_CONTROLLER); 105 TaskSwitchSource::WINDOW_CYCLE_CONTROLLER);
106 } 106 }
107 active_window_before_window_cycle_ = nullptr; 107 active_window_before_window_cycle_ = nullptr;
108 } 108 }
109 109
110 } // namespace ash 110 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/system_modal_container_layout_manager.cc ('k') | ash/common/wm/window_cycle_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698