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

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

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single-letter typo :(. Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/settings/tray_settings.h ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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
OLDNEW
« no previous file with comments | « ash/system/settings/tray_settings.h ('k') | ash/system/tray/system_tray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698