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

Side by Side Diff: ash/common/system/date/date_default_view.cc

Issue 2761063002: Move more from WmShell to Shell (Closed)
Patch Set: merge 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
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/system/date/date_default_view.h" 5 #include "ash/common/system/date/date_default_view.h"
6 6
7 #include "ash/common/metrics/user_metrics_action.h" 7 #include "ash/common/metrics/user_metrics_action.h"
8 #include "ash/common/session/session_controller.h" 8 #include "ash/common/session/session_controller.h"
9 #include "ash/common/shutdown_controller.h" 9 #include "ash/common/shutdown_controller.h"
10 #include "ash/common/system/date/date_view.h" 10 #include "ash/common/system/date/date_view.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 const tray::DateView* DateDefaultView::GetDateView() const { 122 const tray::DateView* DateDefaultView::GetDateView() const {
123 return date_view_; 123 return date_view_;
124 } 124 }
125 125
126 void DateDefaultView::ButtonPressed(views::Button* sender, 126 void DateDefaultView::ButtonPressed(views::Button* sender,
127 const ui::Event& event) { 127 const ui::Event& event) {
128 WmShell* shell = WmShell::Get(); 128 WmShell* shell = WmShell::Get();
129 if (sender == help_button_) { 129 if (sender == help_button_) {
130 shell->RecordUserMetricsAction(UMA_TRAY_HELP); 130 shell->RecordUserMetricsAction(UMA_TRAY_HELP);
131 shell->system_tray_controller()->ShowHelp(); 131 Shell::Get()->system_tray_controller()->ShowHelp();
132 } else if (sender == shutdown_button_) { 132 } else if (sender == shutdown_button_) {
133 shell->RecordUserMetricsAction(UMA_TRAY_SHUT_DOWN); 133 shell->RecordUserMetricsAction(UMA_TRAY_SHUT_DOWN);
134 Shell::GetInstance()->lock_state_controller()->RequestShutdown(); 134 Shell::GetInstance()->lock_state_controller()->RequestShutdown();
135 } else if (sender == lock_button_) { 135 } else if (sender == lock_button_) {
136 shell->RecordUserMetricsAction(UMA_TRAY_LOCK_SCREEN); 136 shell->RecordUserMetricsAction(UMA_TRAY_LOCK_SCREEN);
137 chromeos::DBusThreadManager::Get() 137 chromeos::DBusThreadManager::Get()
138 ->GetSessionManagerClient() 138 ->GetSessionManagerClient()
139 ->RequestLockScreen(); 139 ->RequestLockScreen();
140 } else { 140 } else {
141 NOTREACHED(); 141 NOTREACHED();
142 } 142 }
143 date_view_->CloseSystemBubble(); 143 date_view_->CloseSystemBubble();
144 } 144 }
145 145
146 } // namespace ash 146 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/system/chromeos/virtual_keyboard/virtual_keyboard_tray.cc ('k') | ash/common/system/date/date_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698