Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: chromeos/display/output_configurator.h

Issue 135563004: Nukes MessageLoop::Dispatcher (2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
16 #include "base/observer_list.h" 17 #include "base/observer_list.h"
17 #include "base/timer/timer.h" 18 #include "base/timer/timer.h"
18 #include "chromeos/chromeos_export.h" 19 #include "chromeos/chromeos_export.h"
19 #include "third_party/cros_system_api/dbus/service_constants.h" 20 #include "third_party/cros_system_api/dbus/service_constants.h"
20 21
21 // Forward declarations for Xlib and Xrandr. 22 // Forward declarations for Xlib and Xrandr.
22 // This is so unused X definitions don't pollute the namespace. 23 // This is so unused X definitions don't pollute the namespace.
23 typedef unsigned long XID; 24 typedef unsigned long XID;
24 typedef XID RROutput; 25 typedef XID RROutput;
25 typedef XID RRCrtc; 26 typedef XID RRCrtc;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // HDCP protection state. 58 // HDCP protection state.
58 enum HDCPState { 59 enum HDCPState {
59 HDCP_STATE_UNDESIRED, 60 HDCP_STATE_UNDESIRED,
60 HDCP_STATE_DESIRED, 61 HDCP_STATE_DESIRED,
61 HDCP_STATE_ENABLED 62 HDCP_STATE_ENABLED
62 }; 63 };
63 64
64 // This class interacts directly with the underlying Xrandr API to manipulate 65 // This class interacts directly with the underlying Xrandr API to manipulate
65 // CTRCs and Outputs. 66 // CTRCs and Outputs.
66 class CHROMEOS_EXPORT OutputConfigurator 67 class CHROMEOS_EXPORT OutputConfigurator
67 : public base::MessageLoop::Dispatcher, 68 : public base::MessagePumpDispatcher,
68 public base::MessagePumpObserver { 69 public base::MessagePumpObserver {
69 public: 70 public:
70 typedef uint64_t OutputProtectionClientId; 71 typedef uint64_t OutputProtectionClientId;
71 static const OutputProtectionClientId kInvalidClientId = 0; 72 static const OutputProtectionClientId kInvalidClientId = 0;
72 73
73 struct ModeInfo { 74 struct ModeInfo {
74 ModeInfo(); 75 ModeInfo();
75 ModeInfo(int width, int height, bool interlaced, float refresh_rate); 76 ModeInfo(int width, int height, bool interlaced, float refresh_rate);
76 77
77 int width; 78 int width;
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 ProtectionRequests client_protection_requests_; 552 ProtectionRequests client_protection_requests_;
552 553
553 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator); 554 DISALLOW_COPY_AND_ASSIGN(OutputConfigurator);
554 }; 555 };
555 556
556 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList; 557 typedef std::vector<OutputConfigurator::OutputSnapshot> OutputSnapshotList;
557 558
558 } // namespace chromeos 559 } // namespace chromeos
559 560
560 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_ 561 #endif // CHROMEOS_DISPLAY_OUTPUT_CONFIGURATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698