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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // to our own reconfiguration operations so spurious events are common. | 94 // to our own reconfiguration operations so spurious events are common. |
95 // Spurious events will have no effect. | 95 // Spurious events will have no effect. |
96 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; | 96 virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE; |
97 | 97 |
98 void AddObserver(Observer* observer); | 98 void AddObserver(Observer* observer); |
99 void RemoveObserver(Observer* observer); | 99 void RemoveObserver(Observer* observer); |
100 | 100 |
101 // Tells if the output specified by |name| is for internal display. | 101 // Tells if the output specified by |name| is for internal display. |
102 static bool IsInternalOutputName(const std::string& name); | 102 static bool IsInternalOutputName(const std::string& name); |
103 | 103 |
| 104 void SuspendDisplays(); |
104 private: | 105 private: |
105 // Fires OnDisplayModeChanged() event to the observers. | 106 // Fires OnDisplayModeChanged() event to the observers. |
106 void NotifyOnDisplayChanged(); | 107 void NotifyOnDisplayChanged(); |
107 | 108 |
108 // Returns a vector filled with properties of the first two connected outputs | 109 // Returns a vector filled with properties of the first two connected outputs |
109 // found on |display| and |screen|. | 110 // found on |display| and |screen|. |
110 std::vector<OutputSnapshot> GetDualOutputs(Display* display, | 111 std::vector<OutputSnapshot> GetDualOutputs(Display* display, |
111 XRRScreenResources* screen); | 112 XRRScreenResources* screen); |
112 | 113 |
113 // Looks for a mode on internal and external outputs having same resolution. | 114 // Looks for a mode on internal and external outputs having same resolution. |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 | 202 |
202 // Indicates the time at which |output_state_| was entered. | 203 // Indicates the time at which |output_state_| was entered. |
203 base::TimeTicks last_enter_state_time_; | 204 base::TimeTicks last_enter_state_time_; |
204 | 205 |
205 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); | 206 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); |
206 }; | 207 }; |
207 | 208 |
208 } // namespace chromeos | 209 } // namespace chromeos |
209 | 210 |
210 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 211 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
OLD | NEW |