OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/system/date/tray_date.h" | 5 #include "ash/system/date/tray_date.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/date/date_view.h" | 8 #include "ash/system/date/date_view.h" |
9 #include "ash/system/tray/system_tray.h" | 9 #include "ash/system/tray/system_tray.h" |
10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 view->AddButton(lock_); | 94 view->AddButton(lock_); |
95 } | 95 } |
96 } | 96 } |
97 } | 97 } |
98 | 98 |
99 virtual ~DateDefaultView() {} | 99 virtual ~DateDefaultView() {} |
100 | 100 |
101 private: | 101 private: |
102 // Overridden from views::ButtonListener. | 102 // Overridden from views::ButtonListener. |
103 virtual void ButtonPressed(views::Button* sender, | 103 virtual void ButtonPressed(views::Button* sender, |
104 const views::Event& event) OVERRIDE { | 104 const ui::Event& event) OVERRIDE { |
105 ash::SystemTrayDelegate* tray = ash::Shell::GetInstance()->tray_delegate(); | 105 ash::SystemTrayDelegate* tray = ash::Shell::GetInstance()->tray_delegate(); |
106 if (sender == help_) | 106 if (sender == help_) |
107 tray->ShowHelp(); | 107 tray->ShowHelp(); |
108 else if (sender == shutdown_) | 108 else if (sender == shutdown_) |
109 tray->ShutDown(); | 109 tray->ShutDown(); |
110 else if (sender == lock_) | 110 else if (sender == lock_) |
111 tray->RequestLockScreen(); | 111 tray->RequestLockScreen(); |
112 else | 112 else |
113 NOTREACHED(); | 113 NOTREACHED(); |
114 } | 114 } |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 time_tray_->UpdateTimeFormat(); | 178 time_tray_->UpdateTimeFormat(); |
179 } | 179 } |
180 | 180 |
181 void TrayDate::Refresh() { | 181 void TrayDate::Refresh() { |
182 if (time_tray_) | 182 if (time_tray_) |
183 time_tray_->UpdateText(); | 183 time_tray_->UpdateText(); |
184 } | 184 } |
185 | 185 |
186 } // namespace internal | 186 } // namespace internal |
187 } // namespace ash | 187 } // namespace ash |
OLD | NEW |