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

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

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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/wm/window_cycle_controller.h ('k') | ash/wm/window_cycle_controller_unittest.cc » ('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/wm/window_cycle_controller.h"
6 6
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/wm/mru_window_tracker.h" 8 #include "ash/common/wm/mru_window_tracker.h"
9 #include "ash/common/wm_shell.h" 9 #include "ash/common/wm_shell.h"
10 #include "ash/shell.h" 10 #include "ash/shell.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 Shell::GetInstance()->window_cycle_controller()->StopCycling(); 55 Shell::GetInstance()->window_cycle_controller()->StopCycling();
56 // Warning: |this| will be deleted from here on. 56 // Warning: |this| will be deleted from here on.
57 } 57 }
58 } 58 }
59 59
60 } // namespace 60 } // namespace
61 61
62 ////////////////////////////////////////////////////////////////////////////// 62 //////////////////////////////////////////////////////////////////////////////
63 // WindowCycleController, public: 63 // WindowCycleController, public:
64 64
65 WindowCycleController::WindowCycleController() { 65 WindowCycleController::WindowCycleController() {}
66 }
67 66
68 WindowCycleController::~WindowCycleController() { 67 WindowCycleController::~WindowCycleController() {}
69 }
70 68
71 // static 69 // static
72 bool WindowCycleController::CanCycle() { 70 bool WindowCycleController::CanCycle() {
73 // Prevent window cycling if the screen is locked or a modal dialog is open. 71 // Prevent window cycling if the screen is locked or a modal dialog is open.
74 WmShell* wm_shell = WmShell::Get(); 72 WmShell* wm_shell = WmShell::Get();
75 return !wm_shell->GetSessionStateDelegate()->IsScreenLocked() && 73 return !wm_shell->GetSessionStateDelegate()->IsScreenLocked() &&
76 !wm_shell->IsSystemModalWindowOpen() && !wm_shell->IsPinned(); 74 !wm_shell->IsSystemModalWindowOpen() && !wm_shell->IsPinned();
77 } 75 }
78 76
79 void WindowCycleController::HandleCycleWindow(Direction direction) { 77 void WindowCycleController::HandleCycleWindow(Direction direction) {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 active_window_before_window_cycle_ != active_window_after_window_cycle) { 119 active_window_before_window_cycle_ != active_window_after_window_cycle) {
122 Shell::GetInstance() 120 Shell::GetInstance()
123 ->metrics() 121 ->metrics()
124 ->task_switch_metrics_recorder() 122 ->task_switch_metrics_recorder()
125 .OnTaskSwitch(TaskSwitchMetricsRecorder::WINDOW_CYCLE_CONTROLLER); 123 .OnTaskSwitch(TaskSwitchMetricsRecorder::WINDOW_CYCLE_CONTROLLER);
126 } 124 }
127 active_window_before_window_cycle_ = nullptr; 125 active_window_before_window_cycle_ = nullptr;
128 } 126 }
129 127
130 } // namespace ash 128 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_cycle_controller.h ('k') | ash/wm/window_cycle_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698