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

Side by Side Diff: ui/display/chromeos/x11/native_display_delegate_x11.h

Issue 233653002: x11: Remove MessagePumpObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ 5 #ifndef UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_
6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ 6 #define UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 27 matching lines...) Expand all
38 38
39 namespace ui { 39 namespace ui {
40 40
41 class DisplayModeX11; 41 class DisplayModeX11;
42 class DisplaySnapshotX11; 42 class DisplaySnapshotX11;
43 class NativeDisplayEventDispatcherX11; 43 class NativeDisplayEventDispatcherX11;
44 44
45 class DISPLAY_EXPORT NativeDisplayDelegateX11 : public NativeDisplayDelegate { 45 class DISPLAY_EXPORT NativeDisplayDelegateX11 : public NativeDisplayDelegate {
46 public: 46 public:
47 // Helper class that allows NativeDisplayEventDispatcherX11 and 47 // Helper class that allows NativeDisplayEventDispatcherX11 and
48 // NativeDisplayDelegateX11::MessagePumpObserverX11 to interact with this 48 // NativeDisplayDelegateX11::PlatformEventObserverX11 to interact with this
49 // class or with mocks in tests. 49 // class or with mocks in tests.
50 class HelperDelegate { 50 class HelperDelegate {
51 public: 51 public:
52 virtual ~HelperDelegate() {} 52 virtual ~HelperDelegate() {}
53 53
54 // Tells XRandR to update its configuration in response to |event|, an 54 // Tells XRandR to update its configuration in response to |event|, an
55 // RRScreenChangeNotify event. 55 // RRScreenChangeNotify event.
56 virtual void UpdateXRandRConfiguration(const base::NativeEvent& event) = 0; 56 virtual void UpdateXRandRConfiguration(const base::NativeEvent& event) = 0;
57 57
58 // Returns the list of current outputs. This is used to discard duplicate 58 // Returns the list of current outputs. This is used to discard duplicate
(...skipping 29 matching lines...) Expand all
88 GetAvailableColorCalibrationProfiles( 88 GetAvailableColorCalibrationProfiles(
89 const DisplaySnapshot& output) OVERRIDE; 89 const DisplaySnapshot& output) OVERRIDE;
90 virtual bool SetColorCalibrationProfile( 90 virtual bool SetColorCalibrationProfile(
91 const DisplaySnapshot& output, 91 const DisplaySnapshot& output,
92 ColorCalibrationProfile new_profile) OVERRIDE; 92 ColorCalibrationProfile new_profile) OVERRIDE;
93 virtual void AddObserver(NativeDisplayObserver* observer) OVERRIDE; 93 virtual void AddObserver(NativeDisplayObserver* observer) OVERRIDE;
94 virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE; 94 virtual void RemoveObserver(NativeDisplayObserver* observer) OVERRIDE;
95 95
96 private: 96 private:
97 class HelperDelegateX11; 97 class HelperDelegateX11;
98 class MessagePumpObserverX11; 98 class PlatformEventObserverX11;
99 99
100 // Parses all the modes made available by |screen_|. 100 // Parses all the modes made available by |screen_|.
101 void InitModes(); 101 void InitModes();
102 102
103 // Helper method for GetOutputs() that returns an OutputSnapshot struct based 103 // Helper method for GetOutputs() that returns an OutputSnapshot struct based
104 // on the passed-in information. 104 // on the passed-in information.
105 DisplaySnapshotX11* InitDisplaySnapshot(RROutput id, 105 DisplaySnapshotX11* InitDisplaySnapshot(RROutput id,
106 XRROutputInfo* info, 106 XRROutputInfo* info,
107 RRCrtc* last_used_crtc, 107 RRCrtc* last_used_crtc,
108 int index); 108 int index);
(...skipping 27 matching lines...) Expand all
136 // propagate them. 136 // propagate them.
137 ScopedVector<DisplaySnapshot> cached_outputs_; 137 ScopedVector<DisplaySnapshot> cached_outputs_;
138 138
139 scoped_ptr<HelperDelegate> helper_delegate_; 139 scoped_ptr<HelperDelegate> helper_delegate_;
140 140
141 // Processes X11 display events associated with the root window and notifies 141 // Processes X11 display events associated with the root window and notifies
142 // |observers_| when a display change has occurred. 142 // |observers_| when a display change has occurred.
143 scoped_ptr<NativeDisplayEventDispatcherX11> platform_event_dispatcher_; 143 scoped_ptr<NativeDisplayEventDispatcherX11> platform_event_dispatcher_;
144 144
145 // Processes X11 display events that have no X11 window associated with it. 145 // Processes X11 display events that have no X11 window associated with it.
146 scoped_ptr<MessagePumpObserverX11> message_pump_observer_; 146 scoped_ptr<PlatformEventObserverX11> platform_event_observer_;
147 147
148 // List of observers waiting for display configuration change events. 148 // List of observers waiting for display configuration change events.
149 ObserverList<NativeDisplayObserver> observers_; 149 ObserverList<NativeDisplayObserver> observers_;
150 150
151 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateX11); 151 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateX11);
152 }; 152 };
153 153
154 } // namespace ui 154 } // namespace ui
155 155
156 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ 156 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_aurax11.cc ('k') | ui/display/chromeos/x11/native_display_delegate_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698