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 #ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 5 #ifndef ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 6 #define ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 private: | 80 private: |
81 friend class test::PowerButtonControllerTest; | 81 friend class test::PowerButtonControllerTest; |
82 | 82 |
83 // Are the power or lock buttons currently held? | 83 // Are the power or lock buttons currently held? |
84 bool power_button_down_; | 84 bool power_button_down_; |
85 bool lock_button_down_; | 85 bool lock_button_down_; |
86 | 86 |
87 // True when the volume down button is being held down. | 87 // True when the volume down button is being held down. |
88 bool volume_down_pressed_; | 88 bool volume_down_pressed_; |
89 | 89 |
| 90 #if defined(OS_CHROMEOS) |
| 91 // Volume to be restored after a screenshot is taken by pressing the power |
| 92 // button while holding VKEY_VOLUME_DOWN. |
| 93 int volume_percent_before_screenshot_; |
| 94 #endif |
| 95 |
90 // Has the screen brightness been reduced to 0%? | 96 // Has the screen brightness been reduced to 0%? |
91 bool brightness_is_zero_; | 97 bool brightness_is_zero_; |
92 | 98 |
93 // True if an internal display is off while an external display is on (e.g. | 99 // True if an internal display is off while an external display is on (e.g. |
94 // for Chrome OS's docked mode, where a Chromebook's lid is closed while an | 100 // for Chrome OS's docked mode, where a Chromebook's lid is closed while an |
95 // external display is connected). | 101 // external display is connected). |
96 bool internal_display_off_and_external_display_on_; | 102 bool internal_display_off_and_external_display_on_; |
97 | 103 |
98 // Was a command-line switch set telling us that we're running on hardware | 104 // Was a command-line switch set telling us that we're running on hardware |
99 // that misreports power button releases? | 105 // that misreports power button releases? |
100 bool has_legacy_power_button_; | 106 bool has_legacy_power_button_; |
101 | 107 |
102 // Enables quick, non-cancellable locking of the screen when in maximize mode. | 108 // Enables quick, non-cancellable locking of the screen when in maximize mode. |
103 bool enable_quick_lock_; | 109 bool enable_quick_lock_; |
104 | 110 |
105 LockStateController* controller_; // Not owned. | 111 LockStateController* controller_; // Not owned. |
106 | 112 |
107 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); | 113 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); |
108 }; | 114 }; |
109 | 115 |
110 } // namespace ash | 116 } // namespace ash |
111 | 117 |
112 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 118 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
OLD | NEW |