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 <map> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
10 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
11 #include "ui/display/types/native_display_delegate.h" | 13 #include "ui/display/types/native_display_delegate.h" |
12 #include "ui/events/ozone/device/device_event_observer.h" | 14 #include "ui/events/ozone/device/device_event_observer.h" |
13 #include "ui/ozone/public/gpu_platform_support_host.h" | 15 #include "ui/ozone/public/gpu_platform_support_host.h" |
14 | 16 |
15 namespace ui { | 17 namespace ui { |
16 | 18 |
17 class DeviceManager; | 19 class DeviceManager; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // GpuPlatformSupportHost: | 62 // GpuPlatformSupportHost: |
61 void OnChannelEstablished(int host_id, IPC::Sender* sender) override; | 63 void OnChannelEstablished(int host_id, IPC::Sender* sender) override; |
62 void OnChannelDestroyed(int host_id) override; | 64 void OnChannelDestroyed(int host_id) override; |
63 | 65 |
64 // IPC::Listener overrides: | 66 // IPC::Listener overrides: |
65 bool OnMessageReceived(const IPC::Message& message) override; | 67 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); |
| 72 void OnDisplayConfigured(int64_t display_id, bool status); |
70 | 73 |
71 DriGpuPlatformSupportHost* proxy_; // Not owned. | 74 DriGpuPlatformSupportHost* proxy_; // Not owned. |
72 DeviceManager* device_manager_; // Not owned. | 75 DeviceManager* device_manager_; // Not owned. |
73 DisplayManager* display_manager_; // Not owned. | 76 DisplayManager* display_manager_; // Not owned. |
74 | 77 |
| 78 // Keeps track if there is a dummy display. This happens on initialization |
| 79 // when there is no connection to the GPU to update the displays. |
| 80 bool has_dummy_display_; |
| 81 |
75 ScopedVector<DisplaySnapshot> displays_; | 82 ScopedVector<DisplaySnapshot> displays_; |
76 ObserverList<NativeDisplayObserver> observers_; | 83 ObserverList<NativeDisplayObserver> observers_; |
77 | 84 |
| 85 GetDisplaysCallback get_displays_callback_; |
| 86 |
| 87 // Map between display_id and the configuration callback. |
| 88 std::map<int64_t, ConfigureCallback> configure_callback_map_; |
| 89 |
78 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateProxy); | 90 DISALLOW_COPY_AND_ASSIGN(NativeDisplayDelegateProxy); |
79 }; | 91 }; |
80 | 92 |
81 } // namespace ui | 93 } // namespace ui |
82 | 94 |
83 #endif // UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_ | 95 #endif // UI_OZONE_PLATFORM_DRI_NATIVE_DISPLAY_DELEGATE_PROXY_H_ |
OLD | NEW |