OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/common/system/chromeos/brightness/tray_brightness.h" | 5 #include "ash/common/system/chromeos/brightness/tray_brightness.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/common/material_design/material_design_controller.h" | 9 #include "ash/common/material_design/material_design_controller.h" |
10 #include "ash/common/shell_observer.h" | 10 #include "ash/common/shell_observer.h" |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 brightness_view_ = NULL; | 250 brightness_view_ = NULL; |
251 } | 251 } |
252 | 252 |
253 void TrayBrightness::DestroyDetailedView() { | 253 void TrayBrightness::DestroyDetailedView() { |
254 if (brightness_view_ && !brightness_view_->is_default_view()) | 254 if (brightness_view_ && !brightness_view_->is_default_view()) |
255 brightness_view_ = NULL; | 255 brightness_view_ = NULL; |
256 } | 256 } |
257 | 257 |
258 void TrayBrightness::UpdateAfterLoginStatusChange(LoginStatus status) {} | 258 void TrayBrightness::UpdateAfterLoginStatusChange(LoginStatus status) {} |
259 | 259 |
260 bool TrayBrightness::ShouldHideArrow() const { | |
261 return true; | |
262 } | |
263 | |
264 bool TrayBrightness::ShouldShowShelf() const { | 260 bool TrayBrightness::ShouldShowShelf() const { |
265 return false; | 261 return false; |
266 } | 262 } |
267 | 263 |
268 void TrayBrightness::BrightnessChanged(int level, bool user_initiated) { | 264 void TrayBrightness::BrightnessChanged(int level, bool user_initiated) { |
269 WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_BRIGHTNESS_CHANGED); | 265 WmShell::Get()->RecordUserMetricsAction(UMA_STATUS_AREA_BRIGHTNESS_CHANGED); |
270 double percent = static_cast<double>(level); | 266 double percent = static_cast<double>(level); |
271 HandleBrightnessChanged(percent, user_initiated); | 267 HandleBrightnessChanged(percent, user_initiated); |
272 } | 268 } |
273 | 269 |
(...skipping 14 matching lines...) Expand all Loading... |
288 if (!display::Display::HasInternalDisplay()) | 284 if (!display::Display::HasInternalDisplay()) |
289 return; | 285 return; |
290 | 286 |
291 if (brightness_view_) | 287 if (brightness_view_) |
292 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); | 288 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); |
293 else | 289 else |
294 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); | 290 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); |
295 } | 291 } |
296 | 292 |
297 } // namespace ash | 293 } // namespace ash |
OLD | NEW |