| 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/session/session_state_delegate.h" | 7 #include "ash/session/session_state_delegate.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/system/chromeos/power/power_status.h" | 9 #include "ash/system/chromeos/power/power_status.h" |
| 10 #include "ash/system/chromeos/power/power_status_view.h" | 10 #include "ash/system/chromeos/power/power_status_view.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 57 |
| 58 base::string16 text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_SETTINGS); | 58 base::string16 text = rb.GetLocalizedString(IDS_ASH_STATUS_TRAY_SETTINGS); |
| 59 label_ = new views::Label(text); | 59 label_ = new views::Label(text); |
| 60 AddChildView(label_); | 60 AddChildView(label_); |
| 61 SetAccessibleName(text); | 61 SetAccessibleName(text); |
| 62 | 62 |
| 63 power_view_right_align = true; | 63 power_view_right_align = true; |
| 64 } | 64 } |
| 65 | 65 |
| 66 if (PowerStatus::Get()->IsBatteryPresent()) { | 66 if (PowerStatus::Get()->IsBatteryPresent()) { |
| 67 power_status_view_ = new ash::PowerStatusView( | 67 power_status_view_ = new ash::PowerStatusView(power_view_right_align); |
| 68 ash::PowerStatusView::VIEW_DEFAULT, power_view_right_align); | |
| 69 AddChildView(power_status_view_); | 68 AddChildView(power_status_view_); |
| 70 OnPowerStatusChanged(); | 69 OnPowerStatusChanged(); |
| 71 } | 70 } |
| 72 } | 71 } |
| 73 | 72 |
| 74 ~SettingsDefaultView() override { PowerStatus::Get()->RemoveObserver(this); } | 73 ~SettingsDefaultView() override { PowerStatus::Get()->RemoveObserver(this); } |
| 75 | 74 |
| 76 // Overridden from ash::ActionableView. | 75 // Overridden from ash::ActionableView. |
| 77 bool PerformAction(const ui::Event& event) override { | 76 bool PerformAction(const ui::Event& event) override { |
| 78 bool userAddingRunning = ash::Shell::GetInstance() | 77 bool userAddingRunning = ash::Shell::GetInstance() |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 default_view_ = NULL; | 164 default_view_ = NULL; |
| 166 } | 165 } |
| 167 | 166 |
| 168 void TraySettings::DestroyDetailedView() { | 167 void TraySettings::DestroyDetailedView() { |
| 169 } | 168 } |
| 170 | 169 |
| 171 void TraySettings::UpdateAfterLoginStatusChange(user::LoginStatus status) { | 170 void TraySettings::UpdateAfterLoginStatusChange(user::LoginStatus status) { |
| 172 } | 171 } |
| 173 | 172 |
| 174 } // namespace ash | 173 } // namespace ash |
| OLD | NEW |