| OLD | NEW |
| 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/system/date/date_default_view.h" | 5 #include "ash/system/date/date_default_view.h" |
| 6 | 6 |
| 7 #include "ash/metrics/user_metrics_recorder.h" | 7 #include "ash/metrics/user_metrics_recorder.h" |
| 8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/system/date/date_view.h" | 10 #include "ash/system/date/date_view.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 SystemTrayDelegate* system_tray_delegate = | 95 SystemTrayDelegate* system_tray_delegate = |
| 96 Shell::GetInstance()->system_tray_delegate(); | 96 Shell::GetInstance()->system_tray_delegate(); |
| 97 if (system_tray_delegate) | 97 if (system_tray_delegate) |
| 98 system_tray_delegate->RemoveShutdownPolicyObserver(this); | 98 system_tray_delegate->RemoveShutdownPolicyObserver(this); |
| 99 } | 99 } |
| 100 | 100 |
| 101 views::View* DateDefaultView::GetHelpButtonView() { | 101 views::View* DateDefaultView::GetHelpButtonView() { |
| 102 return help_button_; | 102 return help_button_; |
| 103 } | 103 } |
| 104 | 104 |
| 105 const views::View* DateDefaultView::GetShutdownButtonViewForTest() const { |
| 106 return shutdown_button_; |
| 107 } |
| 108 |
| 105 tray::DateView* DateDefaultView::GetDateView() { | 109 tray::DateView* DateDefaultView::GetDateView() { |
| 106 return date_view_; | 110 return date_view_; |
| 107 } | 111 } |
| 108 | 112 |
| 109 const tray::DateView* DateDefaultView::GetDateView() const { | 113 const tray::DateView* DateDefaultView::GetDateView() const { |
| 110 return date_view_; | 114 return date_view_; |
| 111 } | 115 } |
| 112 | 116 |
| 113 void DateDefaultView::ButtonPressed(views::Button* sender, | 117 void DateDefaultView::ButtonPressed(views::Button* sender, |
| 114 const ui::Event& event) { | 118 const ui::Event& event) { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 131 void DateDefaultView::OnShutdownPolicyChanged(bool reboot_on_shutdown) { | 135 void DateDefaultView::OnShutdownPolicyChanged(bool reboot_on_shutdown) { |
| 132 if (!shutdown_button_) | 136 if (!shutdown_button_) |
| 133 return; | 137 return; |
| 134 | 138 |
| 135 shutdown_button_->SetTooltipText(l10n_util::GetStringUTF16( | 139 shutdown_button_->SetTooltipText(l10n_util::GetStringUTF16( |
| 136 reboot_on_shutdown ? IDS_ASH_STATUS_TRAY_REBOOT | 140 reboot_on_shutdown ? IDS_ASH_STATUS_TRAY_REBOOT |
| 137 : IDS_ASH_STATUS_TRAY_SHUTDOWN)); | 141 : IDS_ASH_STATUS_TRAY_SHUTDOWN)); |
| 138 } | 142 } |
| 139 | 143 |
| 140 } // namespace ash | 144 } // namespace ash |
| OLD | NEW |