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/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 Loading... |
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 Loading... |
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 |
OLD | NEW |