| 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/power/tray_power.h" | 5 #include "ash/system/chromeos/power/tray_power.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
| 10 #include "ash/common/accessibility_delegate.h" | 10 #include "ash/common/accessibility_delegate.h" |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 // There may not be enough information when this is created about whether | 165 // There may not be enough information when this is created about whether |
| 166 // there is a battery or not. So always create this, and adjust visibility as | 166 // there is a battery or not. So always create this, and adjust visibility as |
| 167 // necessary. | 167 // necessary. |
| 168 CHECK(power_tray_ == NULL); | 168 CHECK(power_tray_ == NULL); |
| 169 power_tray_ = new tray::PowerTrayView(); | 169 power_tray_ = new tray::PowerTrayView(); |
| 170 power_tray_->UpdateStatus(false); | 170 power_tray_->UpdateStatus(false); |
| 171 return power_tray_; | 171 return power_tray_; |
| 172 } | 172 } |
| 173 | 173 |
| 174 views::View* TrayPower::CreateDefaultView(LoginStatus status) { | 174 views::View* TrayPower::CreateDefaultView(LoginStatus status) { |
| 175 // Make sure icon status is up-to-date. (Also triggers stub activation). | 175 // Make sure icon status is up to date. (Also triggers stub activation). |
| 176 PowerStatus::Get()->RequestStatusUpdate(); | 176 PowerStatus::Get()->RequestStatusUpdate(); |
| 177 return NULL; | 177 return NULL; |
| 178 } | 178 } |
| 179 | 179 |
| 180 void TrayPower::DestroyTrayView() { | 180 void TrayPower::DestroyTrayView() { |
| 181 power_tray_ = NULL; | 181 power_tray_ = NULL; |
| 182 } | 182 } |
| 183 | 183 |
| 184 void TrayPower::DestroyDefaultView() { | 184 void TrayPower::DestroyDefaultView() { |
| 185 } | 185 } |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 } | 355 } |
| 356 NOTREACHED(); | 356 NOTREACHED(); |
| 357 return false; | 357 return false; |
| 358 } | 358 } |
| 359 | 359 |
| 360 void TrayPower::NotifyUsbNotificationClosedByUser() { | 360 void TrayPower::NotifyUsbNotificationClosedByUser() { |
| 361 usb_notification_dismissed_ = true; | 361 usb_notification_dismissed_ = true; |
| 362 } | 362 } |
| 363 | 363 |
| 364 } // namespace ash | 364 } // namespace ash |
| OLD | NEW |