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/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/system/brightness/brightness_control_delegate.h" | 9 #include "ash/system/brightness/brightness_control_delegate.h" |
10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 void TrayBrightness::DestroyDefaultView() { | 177 void TrayBrightness::DestroyDefaultView() { |
178 if (is_default_view_) | 178 if (is_default_view_) |
179 brightness_view_.reset(); | 179 brightness_view_.reset(); |
180 } | 180 } |
181 | 181 |
182 void TrayBrightness::DestroyDetailedView() { | 182 void TrayBrightness::DestroyDetailedView() { |
183 if (!is_default_view_) | 183 if (!is_default_view_) |
184 brightness_view_.reset(); | 184 brightness_view_.reset(); |
185 } | 185 } |
186 | 186 |
| 187 void TrayBrightness::UpdateAfterLoginStatusChange(user::LoginStatus status) { |
| 188 } |
| 189 |
187 void TrayBrightness::OnBrightnessChanged(double percent, bool user_initiated) { | 190 void TrayBrightness::OnBrightnessChanged(double percent, bool user_initiated) { |
188 current_percent_ = percent; | 191 current_percent_ = percent; |
189 got_current_percent_ = true; | 192 got_current_percent_ = true; |
190 | 193 |
191 if (brightness_view_.get()) | 194 if (brightness_view_.get()) |
192 brightness_view_->SetBrightnessPercent(percent); | 195 brightness_view_->SetBrightnessPercent(percent); |
193 if (!user_initiated) | 196 if (!user_initiated) |
194 return; | 197 return; |
195 | 198 |
196 if (brightness_view_.get()) | 199 if (brightness_view_.get()) |
197 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); | 200 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); |
198 else | 201 else |
199 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); | 202 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); |
200 } | 203 } |
201 | 204 |
202 } // namespace internal | 205 } // namespace internal |
203 } // namespace ash | 206 } // namespace ash |
OLD | NEW |