| 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/settings/tray_settings.h" | 5 #include "ash/system/settings/tray_settings.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/system/power/power_status_view.h" | 8 #include "ash/system/power/power_status_view.h" |
| 9 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
| 10 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 private: | 107 private: |
| 108 user::LoginStatus login_status_; | 108 user::LoginStatus login_status_; |
| 109 views::Label* label_; | 109 views::Label* label_; |
| 110 ash::internal::PowerStatusView* power_status_view_; | 110 ash::internal::PowerStatusView* power_status_view_; |
| 111 | 111 |
| 112 DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView); | 112 DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView); |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 } // namespace tray | 115 } // namespace tray |
| 116 | 116 |
| 117 TraySettings::TraySettings() | 117 TraySettings::TraySettings(SystemTray* system_tray) |
| 118 : default_view_(NULL) { | 118 : SystemTrayItem(system_tray), |
| 119 default_view_(NULL) { |
| 119 } | 120 } |
| 120 | 121 |
| 121 TraySettings::~TraySettings() {} | 122 TraySettings::~TraySettings() {} |
| 122 | 123 |
| 123 views::View* TraySettings::CreateTrayView(user::LoginStatus status) { | 124 views::View* TraySettings::CreateTrayView(user::LoginStatus status) { |
| 124 return NULL; | 125 return NULL; |
| 125 } | 126 } |
| 126 | 127 |
| 127 views::View* TraySettings::CreateDefaultView(user::LoginStatus status) { | 128 views::View* TraySettings::CreateDefaultView(user::LoginStatus status) { |
| 128 if ((status == user::LOGGED_IN_NONE || status == user::LOGGED_IN_LOCKED) && | 129 if ((status == user::LOGGED_IN_NONE || status == user::LOGGED_IN_LOCKED) && |
| (...skipping 25 matching lines...) Expand all Loading... |
| 154 } | 155 } |
| 155 | 156 |
| 156 // Overridden from PowerStatusObserver. | 157 // Overridden from PowerStatusObserver. |
| 157 void TraySettings::OnPowerStatusChanged(const PowerSupplyStatus& status) { | 158 void TraySettings::OnPowerStatusChanged(const PowerSupplyStatus& status) { |
| 158 if (default_view_) | 159 if (default_view_) |
| 159 default_view_->UpdatePowerStatus(status); | 160 default_view_->UpdatePowerStatus(status); |
| 160 } | 161 } |
| 161 | 162 |
| 162 } // namespace internal | 163 } // namespace internal |
| 163 } // namespace ash | 164 } // namespace ash |
| OLD | NEW |