Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(577)

Side by Side Diff: ash/system/chromeos/settings/tray_settings.cc

Issue 1014753003: Move low battery notification to Message Center. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made suggested changes Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698