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 CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 5 #ifndef CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 6 #define CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 // Detects displays first time from unknown state. | 97 // Detects displays first time from unknown state. |
98 void Start(); | 98 void Start(); |
99 | 99 |
100 // Stop handling display configuration events/requests. | 100 // Stop handling display configuration events/requests. |
101 void Stop(); | 101 void Stop(); |
102 | 102 |
103 // Called when powerd notifies us that some set of displays should be turned | 103 // Called when powerd notifies us that some set of displays should be turned |
104 // on or off. This requires enabling or disabling the CRTC associated with | 104 // on or off. This requires enabling or disabling the CRTC associated with |
105 // the display(s) in question so that the low power state is engaged. | 105 // the display(s) in question so that the low power state is engaged. |
106 // If |force_probe| is true, the displays will be configured even if | 106 // If |force_probe| is true, the displays will be configured even if |
107 // |power_state| matches |power_state_|. | 107 // |power_state| matches |power_state_|. If |
108 bool SetDisplayPower(DisplayPowerState power_state, bool force_probe); | 108 // |only_if_single_internal_display| is true, the state will not be |
109 // changed if multiple displays are connected or if the display is not | |
110 // internal. | |
111 bool SetDisplayPower(DisplayPowerState power_state, | |
112 bool force_probe, | |
113 bool only_if_single_internal_display); | |
Daniel Erat
2013/03/27 23:15:19
I would've preferred to let callers deal with the
| |
109 | 114 |
110 // Force switching the display mode to |new_state|. Returns false if | 115 // Force switching the display mode to |new_state|. Returns false if |
111 // it was called in a single-head or headless mode. | 116 // it was called in a single-head or headless mode. |
112 bool SetDisplayMode(OutputState new_state); | 117 bool SetDisplayMode(OutputState new_state); |
113 | 118 |
114 // Called when an RRNotify event is received. The implementation is | 119 // Called when an RRNotify event is received. The implementation is |
115 // interested in the cases of RRNotify events which correspond to output | 120 // interested in the cases of RRNotify events which correspond to output |
116 // add/remove events. Note that Output add/remove events are sent in response | 121 // add/remove events. Note that Output add/remove events are sent in response |
117 // to our own reconfiguration operations so spurious events are common. | 122 // to our own reconfiguration operations so spurious events are common. |
118 // Spurious events will have no effect. | 123 // Spurious events will have no effect. |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
248 | 253 |
249 // Indicates the time at which |output_state_| was entered. | 254 // Indicates the time at which |output_state_| was entered. |
250 base::TimeTicks last_enter_state_time_; | 255 base::TimeTicks last_enter_state_time_; |
251 | 256 |
252 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); | 257 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); |
253 }; | 258 }; |
254 | 259 |
255 } // namespace chromeos | 260 } // namespace chromeos |
256 | 261 |
257 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 262 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
OLD | NEW |