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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
10 #include "ash/ash_constants.h" | 10 #include "ash/ash_constants.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 virtual ~BrightnessView(); | 54 virtual ~BrightnessView(); |
55 | 55 |
56 bool is_default_view() const { | 56 bool is_default_view() const { |
57 return is_default_view_; | 57 return is_default_view_; |
58 } | 58 } |
59 | 59 |
60 // |percent| is in the range [0.0, 100.0]. | 60 // |percent| is in the range [0.0, 100.0]. |
61 void SetBrightnessPercent(double percent); | 61 void SetBrightnessPercent(double percent); |
62 | 62 |
63 // ShellObserver: | 63 // ShellObserver: |
64 virtual void OnMaximizeModeStarted() OVERRIDE; | 64 virtual void OnMaximizeModeStarted() override; |
65 virtual void OnMaximizeModeEnded() OVERRIDE; | 65 virtual void OnMaximizeModeEnded() override; |
66 | 66 |
67 private: | 67 private: |
68 // views::View: | 68 // views::View: |
69 virtual void OnBoundsChanged(const gfx::Rect& old_bounds) OVERRIDE; | 69 virtual void OnBoundsChanged(const gfx::Rect& old_bounds) override; |
70 | 70 |
71 // views:SliderListener: | 71 // views:SliderListener: |
72 virtual void SliderValueChanged(views::Slider* sender, | 72 virtual void SliderValueChanged(views::Slider* sender, |
73 float value, | 73 float value, |
74 float old_value, | 74 float old_value, |
75 views::SliderChangeReason reason) OVERRIDE; | 75 views::SliderChangeReason reason) override; |
76 | 76 |
77 // views:SliderListener: | 77 // views:SliderListener: |
78 virtual void SliderDragStarted(views::Slider* slider) OVERRIDE; | 78 virtual void SliderDragStarted(views::Slider* slider) override; |
79 virtual void SliderDragEnded(views::Slider* slider) OVERRIDE; | 79 virtual void SliderDragEnded(views::Slider* slider) override; |
80 | 80 |
81 views::Slider* slider_; | 81 views::Slider* slider_; |
82 | 82 |
83 // Is |slider_| currently being dragged? | 83 // Is |slider_| currently being dragged? |
84 bool dragging_; | 84 bool dragging_; |
85 | 85 |
86 // True if this view is for the default tray view. Used to control hide/show | 86 // True if this view is for the default tray view. Used to control hide/show |
87 // behaviour of the default view when entering or leaving Maximize Mode. | 87 // behaviour of the default view when entering or leaving Maximize Mode. |
88 bool is_default_view_; | 88 bool is_default_view_; |
89 | 89 |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 if (!Shell::GetInstance()->display_manager()->HasInternalDisplay()) | 276 if (!Shell::GetInstance()->display_manager()->HasInternalDisplay()) |
277 return; | 277 return; |
278 | 278 |
279 if (brightness_view_) | 279 if (brightness_view_) |
280 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); | 280 SetDetailedViewCloseDelay(kTrayPopupAutoCloseDelayInSeconds); |
281 else | 281 else |
282 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); | 282 PopupDetailedView(kTrayPopupAutoCloseDelayInSeconds, false); |
283 } | 283 } |
284 | 284 |
285 } // namespace ash | 285 } // namespace ash |
OLD | NEW |