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

Side by Side Diff: ash/common/accelerators/exit_warning_handler.cc

Issue 2741273002: chromeos: Promotes more from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 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/accelerators/debug_commands.cc ('k') | ash/common/shelf/shelf_view.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 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/accelerators/exit_warning_handler.h" 5 #include "ash/common/accelerators/exit_warning_handler.h"
6 6
7 #include "ash/common/shell_delegate.h" 7 #include "ash/common/shell_delegate.h"
8 #include "ash/common/wm_shell.h" 8 #include "ash/common/wm_shell.h"
9 #include "ash/common/wm_window.h" 9 #include "ash/common/wm_window.h"
10 #include "ash/public/cpp/shell_window_ids.h" 10 #include "ash/public/cpp/shell_window_ids.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 state_ = WAIT_FOR_DOUBLE_PRESS; 109 state_ = WAIT_FOR_DOUBLE_PRESS;
110 Show(); 110 Show();
111 StartTimer(); 111 StartTimer();
112 WmShell::Get()->RecordUserMetricsAction(UMA_ACCEL_EXIT_FIRST_Q); 112 WmShell::Get()->RecordUserMetricsAction(UMA_ACCEL_EXIT_FIRST_Q);
113 break; 113 break;
114 case WAIT_FOR_DOUBLE_PRESS: 114 case WAIT_FOR_DOUBLE_PRESS:
115 state_ = EXITING; 115 state_ = EXITING;
116 CancelTimer(); 116 CancelTimer();
117 Hide(); 117 Hide();
118 WmShell::Get()->RecordUserMetricsAction(UMA_ACCEL_EXIT_SECOND_Q); 118 WmShell::Get()->RecordUserMetricsAction(UMA_ACCEL_EXIT_SECOND_Q);
119 WmShell::Get()->delegate()->Exit(); 119 Shell::Get()->shell_delegate()->Exit();
120 break; 120 break;
121 case EXITING: 121 case EXITING:
122 break; 122 break;
123 } 123 }
124 } 124 }
125 125
126 void ExitWarningHandler::TimerAction() { 126 void ExitWarningHandler::TimerAction() {
127 Hide(); 127 Hide();
128 if (state_ == WAIT_FOR_DOUBLE_PRESS) 128 if (state_ == WAIT_FOR_DOUBLE_PRESS)
129 state_ = IDLE; 129 state_ = IDLE;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 widget_->Show(); 167 widget_->Show();
168 168
169 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true); 169 delegate->NotifyAccessibilityEvent(ui::AX_EVENT_ALERT, true);
170 } 170 }
171 171
172 void ExitWarningHandler::Hide() { 172 void ExitWarningHandler::Hide() {
173 widget_.reset(); 173 widget_.reset();
174 } 174 }
175 175
176 } // namespace ash 176 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/accelerators/debug_commands.cc ('k') | ash/common/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698