| 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 // Set all the displays into pre-suspend mode; usually this means configure |
| 105 // them for their resume state. This allows faster resume on machines where |
| 106 // display configuration is slow. |
| 107 void SuspendDisplays(); |
| 108 |
| 104 private: | 109 private: |
| 105 // Fires OnDisplayModeChanged() event to the observers. | 110 // Fires OnDisplayModeChanged() event to the observers. |
| 106 void NotifyOnDisplayChanged(); | 111 void NotifyOnDisplayChanged(); |
| 107 | 112 |
| 108 // Returns a vector filled with properties of the first two connected outputs | 113 // Returns a vector filled with properties of the first two connected outputs |
| 109 // found on |display| and |screen|. | 114 // found on |display| and |screen|. |
| 110 std::vector<OutputSnapshot> GetDualOutputs(Display* display, | 115 std::vector<OutputSnapshot> GetDualOutputs(Display* display, |
| 111 XRRScreenResources* screen); | 116 XRRScreenResources* screen); |
| 112 | 117 |
| 113 // Looks for a mode on internal and external outputs having same resolution. | 118 // 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 | 206 |
| 202 // Indicates the time at which |output_state_| was entered. | 207 // Indicates the time at which |output_state_| was entered. |
| 203 base::TimeTicks last_enter_state_time_; | 208 base::TimeTicks last_enter_state_time_; |
| 204 | 209 |
| 205 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); | 210 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); |
| 206 }; | 211 }; |
| 207 | 212 |
| 208 } // namespace chromeos | 213 } // namespace chromeos |
| 209 | 214 |
| 210 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 215 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
| OLD | NEW |