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_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_ |
6 #define UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_ | 6 #define UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/observer_list.h" | 10 #include "base/observer_list.h" |
11 #include "ui/display/types/native_display_delegate.h" | 11 #include "ui/display/types/native_display_delegate.h" |
12 #include "ui/events/ozone/device/device_event_observer.h" | 12 #include "ui/events/ozone/device/device_event_observer.h" |
13 #include "ui/ozone/public/gpu_platform_support_host.h" | 13 #include "ui/ozone/public/gpu_platform_support_host.h" |
14 | 14 |
15 namespace ui { | 15 namespace ui { |
16 | 16 |
17 class DeviceManager; | 17 class DeviceManager; |
| 18 class DisplayManager; |
18 class DriGpuPlatformSupportHost; | 19 class DriGpuPlatformSupportHost; |
19 | 20 |
20 struct DisplaySnapshot_Params; | 21 struct DisplaySnapshot_Params; |
21 | 22 |
22 class NativeDisplayDelegateProxy : public NativeDisplayDelegate, | 23 class NativeDisplayDelegateProxy : public NativeDisplayDelegate, |
23 public DeviceEventObserver, | 24 public DeviceEventObserver, |
24 public GpuPlatformSupportHost { | 25 public GpuPlatformSupportHost { |
25 public: | 26 public: |
26 NativeDisplayDelegateProxy(DriGpuPlatformSupportHost* proxy, | 27 NativeDisplayDelegateProxy(DriGpuPlatformSupportHost* proxy, |
27 DeviceManager* device_manager); | 28 DeviceManager* device_manager, |
| 29 DisplayManager* display_manager); |
28 virtual ~NativeDisplayDelegateProxy(); | 30 virtual ~NativeDisplayDelegateProxy(); |
29 | 31 |
30 // NativeDisplayDelegate overrides: | 32 // NativeDisplayDelegate overrides: |
31 virtual void Initialize() override; | 33 virtual void Initialize() override; |
32 virtual void GrabServer() override; | 34 virtual void GrabServer() override; |
33 virtual void UngrabServer() override; | 35 virtual void UngrabServer() override; |
34 virtual void SyncWithServer() override; | 36 virtual void SyncWithServer() override; |
35 virtual void SetBackgroundColor(uint32_t color_argb) override; | 37 virtual void SetBackgroundColor(uint32_t color_argb) override; |
36 virtual void ForceDPMSOn() override; | 38 virtual void ForceDPMSOn() override; |
37 virtual std::vector<DisplaySnapshot*> GetDisplays() override; | 39 virtual std::vector<DisplaySnapshot*> GetDisplays() override; |
(...skipping 25 matching lines...) Expand all Loading... |
63 | 65 |
64 // IPC::Listener overrides: | 66 // IPC::Listener overrides: |
65 virtual bool OnMessageReceived(const IPC::Message& message) override; | 67 virtual bool OnMessageReceived(const IPC::Message& message) override; |
66 | 68 |
67 private: | 69 private: |
68 void OnUpdateNativeDisplays( | 70 void OnUpdateNativeDisplays( |
69 const std::vector<DisplaySnapshot_Params>& displays); | 71 const std::vector<DisplaySnapshot_Params>& displays); |
70 | 72 |
71 DriGpuPlatformSupportHost* proxy_; // Not owned. | 73 DriGpuPlatformSupportHost* proxy_; // Not owned. |
72 DeviceManager* device_manager_; // Not owned. | 74 DeviceManager* device_manager_; // Not owned. |
| 75 DisplayManager* display_manager_; // Not owned. |
| 76 |
73 ScopedVector<DisplaySnapshot> displays_; | 77 ScopedVector<DisplaySnapshot> displays_; |
74 ObserverList<NativeDisplayObserver> observers_; | 78 ObserverList<NativeDisplayObserver> observers_; |
75 | 79 |
76 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateProxy); | 80 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateProxy); |
77 }; | 81 }; |
78 | 82 |
79 } // namespace ui | 83 } // namespace ui |
80 | 84 |
81 #endif // UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_ | 85 #endif // UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_ |
OLD | NEW |