| 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/chromeos/settings/tray_settings.h" | 5 #include "ash/system/chromeos/settings/tray_settings.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/chromeos/power/power_status.h" | 8 #include "ash/system/chromeos/power/power_status.h" |
| 9 #include "ash/system/chromeos/power/power_status_view.h" | 9 #include "ash/system/chromeos/power/power_status_view.h" |
| 10 #include "ash/system/tray/actionable_view.h" | 10 #include "ash/system/tray/actionable_view.h" |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 Layout(); | 101 Layout(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 // Overridden from PowerStatus::Observer. | 104 // Overridden from PowerStatus::Observer. |
| 105 virtual void OnPowerStatusChanged() OVERRIDE { | 105 virtual void OnPowerStatusChanged() OVERRIDE { |
| 106 if (!PowerStatus::Get()->IsBatteryPresent()) | 106 if (!PowerStatus::Get()->IsBatteryPresent()) |
| 107 return; | 107 return; |
| 108 | 108 |
| 109 base::string16 accessible_name = label_ ? | 109 base::string16 accessible_name = label_ ? |
| 110 label_->text() + base::ASCIIToUTF16(", ") + | 110 label_->text() + base::ASCIIToUTF16(", ") + |
| 111 PowerStatus::Get()->GetAccessibleNameString() : | 111 PowerStatus::Get()->GetAccessibleNameString(true) : |
| 112 PowerStatus::Get()->GetAccessibleNameString(); | 112 PowerStatus::Get()->GetAccessibleNameString(true); |
| 113 SetAccessibleName(accessible_name); | 113 SetAccessibleName(accessible_name); |
| 114 } | 114 } |
| 115 | 115 |
| 116 private: | 116 private: |
| 117 user::LoginStatus login_status_; | 117 user::LoginStatus login_status_; |
| 118 views::Label* label_; | 118 views::Label* label_; |
| 119 ash::PowerStatusView* power_status_view_; | 119 ash::PowerStatusView* power_status_view_; |
| 120 | 120 |
| 121 DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView); | 121 DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView); |
| 122 }; | 122 }; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 default_view_ = NULL; | 158 default_view_ = NULL; |
| 159 } | 159 } |
| 160 | 160 |
| 161 void TraySettings::DestroyDetailedView() { | 161 void TraySettings::DestroyDetailedView() { |
| 162 } | 162 } |
| 163 | 163 |
| 164 void TraySettings::UpdateAfterLoginStatusChange(user::LoginStatus status) { | 164 void TraySettings::UpdateAfterLoginStatusChange(user::LoginStatus status) { |
| 165 } | 165 } |
| 166 | 166 |
| 167 } // namespace ash | 167 } // namespace ash |
| OLD | NEW |