OLD | NEW |
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> |
| 11 #include <memory> |
11 #include <set> | 12 #include <set> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
15 #include "base/event_types.h" | 16 #include "base/event_types.h" |
16 #include "base/macros.h" | 17 #include "base/macros.h" |
17 #include "base/memory/scoped_ptr.h" | |
18 #include "base/memory/scoped_vector.h" | 18 #include "base/memory/scoped_vector.h" |
19 #include "base/observer_list.h" | 19 #include "base/observer_list.h" |
20 #include "ui/display/display_export.h" | 20 #include "ui/display/display_export.h" |
21 #include "ui/display/types/native_display_delegate.h" | 21 #include "ui/display/types/native_display_delegate.h" |
22 #include "ui/gfx/geometry/point.h" | 22 #include "ui/gfx/geometry/point.h" |
23 #include "ui/gfx/geometry/size.h" | 23 #include "ui/gfx/geometry/size.h" |
24 #include "ui/gfx/x/x11_types.h" | 24 #include "ui/gfx/x/x11_types.h" |
25 | 25 |
26 // Forward declarations for Xlib and Xrandr. | 26 // Forward declarations for Xlib and Xrandr. |
27 // This is so unused X definitions don't pollute the namespace. | 27 // This is so unused X definitions don't pollute the namespace. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 gfx::XObjectDeleter<XRRScreenResources, void, XRRFreeScreenResources>> | 152 gfx::XObjectDeleter<XRRScreenResources, void, XRRFreeScreenResources>> |
153 screen_; | 153 screen_; |
154 | 154 |
155 std::map<RRMode, DisplayModeX11*> modes_; | 155 std::map<RRMode, DisplayModeX11*> modes_; |
156 | 156 |
157 // Every time GetOutputs() is called we cache the updated list of outputs in | 157 // Every time GetOutputs() is called we cache the updated list of outputs in |
158 // |cached_outputs_| so that we can check for duplicate events rather than | 158 // |cached_outputs_| so that we can check for duplicate events rather than |
159 // propagate them. | 159 // propagate them. |
160 ScopedVector<DisplaySnapshot> cached_outputs_; | 160 ScopedVector<DisplaySnapshot> cached_outputs_; |
161 | 161 |
162 scoped_ptr<HelperDelegate> helper_delegate_; | 162 std::unique_ptr<HelperDelegate> helper_delegate_; |
163 | 163 |
164 // Processes X11 display events associated with the root window and notifies | 164 // Processes X11 display events associated with the root window and notifies |
165 // |observers_| when a display change has occurred. | 165 // |observers_| when a display change has occurred. |
166 scoped_ptr<NativeDisplayEventDispatcherX11> platform_event_dispatcher_; | 166 std::unique_ptr<NativeDisplayEventDispatcherX11> platform_event_dispatcher_; |
167 | 167 |
168 // List of observers waiting for display configuration change events. | 168 // List of observers waiting for display configuration change events. |
169 base::ObserverList<NativeDisplayObserver> observers_; | 169 base::ObserverList<NativeDisplayObserver> observers_; |
170 | 170 |
171 // A background color used during boot time + multi displays. | 171 // A background color used during boot time + multi displays. |
172 uint32_t background_color_argb_; | 172 uint32_t background_color_argb_; |
173 | 173 |
174 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateX11); | 174 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateX11); |
175 }; | 175 }; |
176 | 176 |
177 } // namespace ui | 177 } // namespace ui |
178 | 178 |
179 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ | 179 #endif // UI_DISPLAY_CHROMEOS_X11_NATIVE_DISPLAY_DELEGATE_X11_H_ |
OLD | NEW |