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

Side by Side Diff: ash/system/brightness/tray_brightness.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: 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
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/brightness/tray_brightness.h" 5 #include "ash/system/brightness/tray_brightness.h"
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/ash_constants.h" 8 #include "ash/ash_constants.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/brightness/brightness_control_delegate.h" 10 #include "ash/system/brightness/brightness_control_delegate.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 154
155 void TrayBrightness::HandleInitialBrightness(double percent) { 155 void TrayBrightness::HandleInitialBrightness(double percent) {
156 if (!got_current_percent_) 156 if (!got_current_percent_)
157 OnBrightnessChanged(percent, false); 157 OnBrightnessChanged(percent, false);
158 } 158 }
159 159
160 views::View* TrayBrightness::CreateTrayView(user::LoginStatus status) { 160 views::View* TrayBrightness::CreateTrayView(user::LoginStatus status) {
161 return NULL; 161 return NULL;
162 } 162 }
163 163
164 views::View* TrayBrightness::CreateDefaultView(user::LoginStatus status) { 164 views::View* TrayBrightness::CreateDefaultView(user::LoginStatus status,
165 int bubble_width) {
165 return NULL; 166 return NULL;
166 } 167 }
167 168
168 views::View* TrayBrightness::CreateDetailedView(user::LoginStatus status) { 169 views::View* TrayBrightness::CreateDetailedView(user::LoginStatus status) {
169 CHECK(brightness_view_ == NULL); 170 CHECK(brightness_view_ == NULL);
170 brightness_view_ = new tray::BrightnessView(current_percent_); 171 brightness_view_ = new tray::BrightnessView(current_percent_);
171 is_default_view_ = false; 172 is_default_view_ = false;
172 return brightness_view_; 173 return brightness_view_;
173 } 174 }
174 175
(...skipping 27 matching lines...) Expand all
202 return; 203 return;
203 204
204 if (brightness_view_) 205 if (brightness_view_)
205 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); 206 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds);
206 else 207 else
207 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); 208 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false);
208 } 209 }
209 210
210 } // namespace internal 211 } // namespace internal
211 } // namespace ash 212 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698