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/system/chromeos/brightness/tray_brightness.h" | 5 #include "ash/system/chromeos/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/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/metrics/user_metrics_recorder.h" | 10 #include "ash/metrics/user_metrics_recorder.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "ui/base/resource/resource_bundle.h" | 25 #include "ui/base/resource/resource_bundle.h" |
26 #include "ui/gfx/image/image.h" | 26 #include "ui/gfx/image/image.h" |
27 #include "ui/views/controls/button/image_button.h" | 27 #include "ui/views/controls/button/image_button.h" |
28 #include "ui/views/controls/image_view.h" | 28 #include "ui/views/controls/image_view.h" |
29 #include "ui/views/controls/label.h" | 29 #include "ui/views/controls/label.h" |
30 #include "ui/views/controls/slider.h" | 30 #include "ui/views/controls/slider.h" |
31 #include "ui/views/layout/box_layout.h" | 31 #include "ui/views/layout/box_layout.h" |
32 #include "ui/views/view.h" | 32 #include "ui/views/view.h" |
33 | 33 |
34 namespace ash { | 34 namespace ash { |
35 namespace internal { | |
36 | |
37 namespace tray { | 35 namespace tray { |
38 | |
39 namespace { | 36 namespace { |
40 | 37 |
41 // We don't let the screen brightness go lower than this when it's being | 38 // We don't let the screen brightness go lower than this when it's being |
42 // adjusted via the slider. Otherwise, if the user doesn't know about the | 39 // adjusted via the slider. Otherwise, if the user doesn't know about the |
43 // brightness keys, they may turn the backlight off and not know how to turn it | 40 // brightness keys, they may turn the backlight off and not know how to turn it |
44 // back on. | 41 // back on. |
45 const double kMinBrightnessPercent = 5.0; | 42 const double kMinBrightnessPercent = 5.0; |
46 | 43 |
47 } // namespace | 44 } // namespace |
48 | 45 |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // level via an on-screen display. | 271 // level via an on-screen display. |
275 if (!Shell::GetInstance()->display_manager()->HasInternalDisplay()) | 272 if (!Shell::GetInstance()->display_manager()->HasInternalDisplay()) |
276 return; | 273 return; |
277 | 274 |
278 if (brightness_view_) | 275 if (brightness_view_) |
279 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); | 276 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); |
280 else | 277 else |
281 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); | 278 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); |
282 } | 279 } |
283 | 280 |
284 } // namespace internal | |
285 } // namespace ash | 281 } // namespace ash |
OLD | NEW |