| 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> |
| 11 | 11 |
| 12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
| 13 #include "base/event_types.h" | 13 #include "base/event_types.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/message_loop/message_pump_dispatcher.h" | |
| 17 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
| 18 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
| 19 #include "chromeos/chromeos_export.h" | 18 #include "chromeos/chromeos_export.h" |
| 20 #include "third_party/cros_system_api/dbus/service_constants.h" | 19 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 21 | 20 |
| 22 // Forward declarations for Xlib and Xrandr. | 21 // Forward declarations for Xlib and Xrandr. |
| 23 // This is so unused X definitions don't pollute the namespace. | 22 // This is so unused X definitions don't pollute the namespace. |
| 24 typedef unsigned long XID; | 23 typedef unsigned long XID; |
| 25 typedef XID RROutput; | 24 typedef XID RROutput; |
| 26 typedef XID RRCrtc; | 25 typedef XID RRCrtc; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // HDCP protection state. | 57 // HDCP protection state. |
| 59 enum HDCPState { | 58 enum HDCPState { |
| 60 HDCP_STATE_UNDESIRED, | 59 HDCP_STATE_UNDESIRED, |
| 61 HDCP_STATE_DESIRED, | 60 HDCP_STATE_DESIRED, |
| 62 HDCP_STATE_ENABLED | 61 HDCP_STATE_ENABLED |
| 63 }; | 62 }; |
| 64 | 63 |
| 65 // This class interacts directly with the underlying Xrandr API to manipulate | 64 // This class interacts directly with the underlying Xrandr API to manipulate |
| 66 // CTRCs and Outputs. | 65 // CTRCs and Outputs. |
| 67 class CHROMEOS_EXPORT OutputConfigurator | 66 class CHROMEOS_EXPORT OutputConfigurator |
| 68 : public base::MessagePumpDispatcher, | 67 : public base::MessageLoop::Dispatcher, |
| 69 public base::MessagePumpObserver { | 68 public base::MessagePumpObserver { |
| 70 public: | 69 public: |
| 71 typedef uint64_t OutputProtectionClientId; | 70 typedef uint64_t OutputProtectionClientId; |
| 72 static const OutputProtectionClientId kInvalidClientId = 0; | 71 static const OutputProtectionClientId kInvalidClientId = 0; |
| 73 | 72 |
| 74 struct ModeInfo { | 73 struct ModeInfo { |
| 75 ModeInfo(); | 74 ModeInfo(); |
| 76 ModeInfo(int width, int height, bool interlaced, float refresh_rate); | 75 ModeInfo(int width, int height, bool interlaced, float refresh_rate); |
| 77 | 76 |
| 78 int width; | 77 int width; |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 ProtectionRequests client_protection_requests_; | 551 ProtectionRequests client_protection_requests_; |
| 553 | 552 |
| 554 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); | 553 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); |
| 555 }; | 554 }; |
| 556 | 555 |
| 557 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; | 556 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; |
| 558 | 557 |
| 559 } // namespace chromeos | 558 } // namespace chromeos |
| 560 | 559 |
| 561 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ | 560 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ |
| OLD | NEW |