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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/event_types.h" | 9 #include "base/event_types.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 unsigned long mm_height; | 97 unsigned long mm_height; |
98 }; | 98 }; |
99 | 99 |
100 // Updates |output_count_|, |output_cache_|, |mirror_supported_|, | 100 // Updates |output_count_|, |output_cache_|, |mirror_supported_|, |
101 // |primary_output_index_|, and |secondary_output_index_| with new data. | 101 // |primary_output_index_|, and |secondary_output_index_| with new data. |
102 // Returns true if the update succeeded or false if it was skipped since no | 102 // Returns true if the update succeeded or false if it was skipped since no |
103 // actual change was observed. | 103 // actual change was observed. |
104 // Note that |output_state_| is not updated by this call. | 104 // Note that |output_state_| is not updated by this call. |
105 bool TryRecacheOutputs(Display* display, XRRScreenResources* screen); | 105 bool TryRecacheOutputs(Display* display, XRRScreenResources* screen); |
106 | 106 |
| 107 // Updates |output_count_|, |output_cache_|, |mirror_supported_|, |
| 108 // |primary_output_index_|, and |secondary_output_index_| with new data. |
| 109 // Note that |output_state_| is not updated by this call. |
| 110 void ForceRecacheOutputs(Display* display, XRRScreenResources* screen); |
| 111 |
107 // Uses the data stored in |output_cache_| and the given |new_state| to | 112 // Uses the data stored in |output_cache_| and the given |new_state| to |
108 // configure the Xrandr interface and then updates |output_state_| to reflect | 113 // configure the Xrandr interface and then updates |output_state_| to reflect |
109 // the new state. | 114 // the new state. |
110 void UpdateCacheAndXrandrToState(Display* display, | 115 void UpdateCacheAndXrandrToState(Display* display, |
111 XRRScreenResources* screen, | 116 XRRScreenResources* screen, |
112 Window window, | 117 Window window, |
113 OutputState new_state); | 118 OutputState new_state); |
114 | 119 |
115 // A helper to re-cache instance variable state and transition into the | 120 // A helper to re-cache instance variable state and transition into the |
116 // appropriate default state for the observed displays. | 121 // appropriate default state for the observed displays. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 OutputState output_state_; | 181 OutputState output_state_; |
177 | 182 |
178 ObserverList<Observer> observers_; | 183 ObserverList<Observer> observers_; |
179 | 184 |
180 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); | 185 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); |
181 }; | 186 }; |
182 | 187 |
183 } // namespace chromeos | 188 } // namespace chromeos |
184 | 189 |
185 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 190 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
OLD | NEW |