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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 const ui::DisplayConfigurator::DisplayStateList& outputs) override; | 73 const ui::DisplayConfigurator::DisplayStateList& outputs) override; |
74 | 74 |
75 // Overridden from chromeos::PowerManagerClient::Observer: | 75 // Overridden from chromeos::PowerManagerClient::Observer: |
76 void PowerButtonEventReceived(bool down, | 76 void PowerButtonEventReceived(bool down, |
77 const base::TimeTicks& timestamp) override; | 77 const base::TimeTicks& timestamp) override; |
78 #endif | 78 #endif |
79 | 79 |
80 private: | 80 private: |
81 friend class test::PowerButtonControllerTest; | 81 friend class test::PowerButtonControllerTest; |
82 | 82 |
83 void TakingScreenshot(); | |
Daniel Erat
2016/07/28 04:45:00
rename to TakeScreenshot and add a comment describ
Qiang(Joe) Xu
2016/07/28 20:25:03
done by deleting this method.
| |
84 | |
83 // Are the power or lock buttons currently held? | 85 // Are the power or lock buttons currently held? |
84 bool power_button_down_; | 86 bool power_button_down_; |
85 bool lock_button_down_; | 87 bool lock_button_down_; |
86 | 88 |
87 // True when the volume down button is being held down. | 89 // True when the volume down button is being held down. |
88 bool volume_down_pressed_; | 90 bool volume_down_pressed_; |
89 | 91 |
92 // Volume to be restored after a maximize mode screenshot. | |
93 int saved_volume_percent_; | |
Daniel Erat
2016/07/28 04:45:00
nit: rename this to something like volume_percent_
Qiang(Joe) Xu
2016/07/28 20:25:02
Done.
| |
94 | |
90 // Has the screen brightness been reduced to 0%? | 95 // Has the screen brightness been reduced to 0%? |
91 bool brightness_is_zero_; | 96 bool brightness_is_zero_; |
92 | 97 |
93 // True if an internal display is off while an external display is on (e.g. | 98 // 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 | 99 // for Chrome OS's docked mode, where a Chromebook's lid is closed while an |
95 // external display is connected). | 100 // external display is connected). |
96 bool internal_display_off_and_external_display_on_; | 101 bool internal_display_off_and_external_display_on_; |
97 | 102 |
98 // Was a command-line switch set telling us that we're running on hardware | 103 // Was a command-line switch set telling us that we're running on hardware |
99 // that misreports power button releases? | 104 // that misreports power button releases? |
100 bool has_legacy_power_button_; | 105 bool has_legacy_power_button_; |
101 | 106 |
102 // Enables quick, non-cancellable locking of the screen when in maximize mode. | 107 // Enables quick, non-cancellable locking of the screen when in maximize mode. |
103 bool enable_quick_lock_; | 108 bool enable_quick_lock_; |
104 | 109 |
105 LockStateController* controller_; // Not owned. | 110 LockStateController* controller_; // Not owned. |
106 | 111 |
107 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); | 112 DISALLOW_COPY_AND_ASSIGN(PowerButtonController); |
108 }; | 113 }; |
109 | 114 |
110 } // namespace ash | 115 } // namespace ash |
111 | 116 |
112 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ | 117 #endif // ASH_WM_POWER_BUTTON_CONTROLLER_H_ |
OLD | NEW |