| 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_view.h" | 8 #include "ash/system/chromeos/power/power_status_view.h" |
| 9 #include "ash/system/tray/actionable_view.h" | 9 #include "ash/system/tray/actionable_view.h" |
| 10 #include "ash/system/tray/fixed_sized_image_view.h" | 10 #include "ash/system/tray/fixed_sized_image_view.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 ash::internal::PowerStatusView* power_status_view_; | 118 ash::internal::PowerStatusView* power_status_view_; |
| 119 | 119 |
| 120 DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView); | 120 DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView); |
| 121 }; | 121 }; |
| 122 | 122 |
| 123 } // namespace tray | 123 } // namespace tray |
| 124 | 124 |
| 125 TraySettings::TraySettings(SystemTray* system_tray) | 125 TraySettings::TraySettings(SystemTray* system_tray) |
| 126 : SystemTrayItem(system_tray), | 126 : SystemTrayItem(system_tray), |
| 127 default_view_(NULL) { | 127 default_view_(NULL) { |
| 128 chromeos::PowerManagerHandler::Get()->AddObserver(this); | 128 // chromeos::PowerManagerHandler::Get()->AddObserver(this); |
| 129 } | 129 } |
| 130 | 130 |
| 131 TraySettings::~TraySettings() { | 131 TraySettings::~TraySettings() { |
| 132 if (chromeos::PowerManagerHandler::IsInitialized()) | 132 if (chromeos::PowerManagerHandler::IsInitialized()) |
| 133 chromeos::PowerManagerHandler::Get()->RemoveObserver(this); | 133 chromeos::PowerManagerHandler::Get()->RemoveObserver(this); |
| 134 } | 134 } |
| 135 | 135 |
| 136 views::View* TraySettings::CreateTrayView(user::LoginStatus status) { | 136 views::View* TraySettings::CreateTrayView(user::LoginStatus status) { |
| 137 return NULL; | 137 return NULL; |
| 138 } | 138 } |
| (...skipping 29 matching lines...) Expand all Loading... |
| 168 } | 168 } |
| 169 | 169 |
| 170 void TraySettings::OnPowerStatusChanged( | 170 void TraySettings::OnPowerStatusChanged( |
| 171 const chromeos::PowerSupplyStatus& status) { | 171 const chromeos::PowerSupplyStatus& status) { |
| 172 if (default_view_) | 172 if (default_view_) |
| 173 default_view_->UpdatePowerStatus(status); | 173 default_view_->UpdatePowerStatus(status); |
| 174 } | 174 } |
| 175 | 175 |
| 176 } // namespace internal | 176 } // namespace internal |
| 177 } // namespace ash | 177 } // namespace ash |
| OLD | NEW |