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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 20 matching lines...) Expand all Loading... |
31 enum OutputState { | 31 enum OutputState { |
32 STATE_INVALID, | 32 STATE_INVALID, |
33 STATE_HEADLESS, | 33 STATE_HEADLESS, |
34 STATE_SINGLE, | 34 STATE_SINGLE, |
35 STATE_DUAL_MIRROR, | 35 STATE_DUAL_MIRROR, |
36 STATE_DUAL_EXTENDED, | 36 STATE_DUAL_EXTENDED, |
37 }; | 37 }; |
38 | 38 |
39 // This class interacts directly with the underlying Xrandr API to manipulate | 39 // This class interacts directly with the underlying Xrandr API to manipulate |
40 // CTRCs and Outputs. | 40 // CTRCs and Outputs. |
41 class CHROMEOS_EXPORT OutputConfigurator : public MessageLoop::Dispatcher { | 41 class CHROMEOS_EXPORT OutputConfigurator |
| 42 : public base::MessageLoop::Dispatcher { |
42 public: | 43 public: |
43 // Information about an output's current state. | 44 // Information about an output's current state. |
44 struct OutputSnapshot { | 45 struct OutputSnapshot { |
45 OutputSnapshot(); | 46 OutputSnapshot(); |
46 | 47 |
47 RROutput output; | 48 RROutput output; |
48 | 49 |
49 // CRTC that should be used for this output. Not necessarily the CRTC | 50 // CRTC that should be used for this output. Not necessarily the CRTC |
50 // that XRandR reports is currently being used. | 51 // that XRandR reports is currently being used. |
51 RRCrtc crtc; | 52 RRCrtc crtc; |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_; | 370 scoped_ptr<base::OneShotTimer<OutputConfigurator> > configure_timer_; |
370 | 371 |
371 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); | 372 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); |
372 }; | 373 }; |
373 | 374 |
374 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; | 375 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; |
375 | 376 |
376 } // namespace chromeos | 377 } // namespace chromeos |
377 | 378 |
378 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 379 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
OLD | NEW |