| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_DRM_GPU_DRM_THREAD_MESSAGE_PROXY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_MESSAGE_PROXY_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_MESSAGE_PROXY_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_MESSAGE_PROXY_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "ipc/message_filter.h" | 12 #include "ipc/message_filter.h" |
| 13 #include "ui/display/types/display_constants.h" | 13 #include "ui/display/types/display_constants.h" |
| 14 #include "ui/display/types/gamma_ramp_rgb_entry.h" | 14 #include "ui/display/types/gamma_ramp_rgb_entry.h" |
| 15 #include "ui/gfx/native_widget_types.h" | 15 #include "ui/gfx/native_widget_types.h" |
| 16 #include "ui/ozone/platform/drm/common/display_types.h" |
| 16 #include "ui/ozone/platform/drm/gpu/inter_thread_messaging_proxy.h" | 17 #include "ui/ozone/platform/drm/gpu/inter_thread_messaging_proxy.h" |
| 17 | 18 |
| 18 namespace base { | 19 namespace base { |
| 19 struct FileDescriptor; | 20 struct FileDescriptor; |
| 20 class FilePath; | 21 class FilePath; |
| 21 } | 22 } |
| 22 | 23 |
| 23 namespace gfx { | 24 namespace gfx { |
| 24 class Point; | 25 class Point; |
| 25 class Rect; | 26 class Rect; |
| 26 } | 27 } |
| 27 | 28 |
| 28 namespace ui { | 29 namespace ui { |
| 29 class DrmThread; | 30 class DrmThread; |
| 30 struct DisplayMode_Params; | 31 struct DisplayMode_Params; |
| 31 struct DisplaySnapshot_Params; | |
| 32 struct OverlayCheck_Params; | 32 struct OverlayCheck_Params; |
| 33 struct OverlayCheckReturn_Params; | 33 struct OverlayCheckReturn_Params; |
| 34 | 34 |
| 35 class DrmThreadMessageProxy : public IPC::MessageFilter, | 35 class DrmThreadMessageProxy : public IPC::MessageFilter, |
| 36 public InterThreadMessagingProxy { | 36 public InterThreadMessagingProxy { |
| 37 public: | 37 public: |
| 38 DrmThreadMessageProxy(); | 38 DrmThreadMessageProxy(); |
| 39 | 39 |
| 40 // InterThreadMessagingProxy. | 40 // InterThreadMessagingProxy. |
| 41 void SetDrmThread(DrmThread* thread) override; | 41 void SetDrmThread(DrmThread* thread) override; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 void OnSetColorCorrection( | 76 void OnSetColorCorrection( |
| 77 int64_t id, | 77 int64_t id, |
| 78 const std::vector<display::GammaRampRGBEntry>& degamma_lut, | 78 const std::vector<display::GammaRampRGBEntry>& degamma_lut, |
| 79 const std::vector<display::GammaRampRGBEntry>& gamma_lut, | 79 const std::vector<display::GammaRampRGBEntry>& gamma_lut, |
| 80 const std::vector<float>& correction_matrix); | 80 const std::vector<float>& correction_matrix); |
| 81 | 81 |
| 82 void OnCheckOverlayCapabilitiesCallback( | 82 void OnCheckOverlayCapabilitiesCallback( |
| 83 gfx::AcceleratedWidget widget, | 83 gfx::AcceleratedWidget widget, |
| 84 const std::vector<OverlayCheck_Params>& overlays, | 84 const std::vector<OverlayCheck_Params>& overlays, |
| 85 const std::vector<OverlayCheckReturn_Params>& returns) const; | 85 const std::vector<OverlayCheckReturn_Params>& returns) const; |
| 86 void OnRefreshNativeDisplaysCallback( | 86 void OnRefreshNativeDisplaysCallback(MovableDisplaySnapshots displays) const; |
| 87 const std::vector<DisplaySnapshot_Params>& displays) const; | |
| 88 void OnConfigureNativeDisplayCallback(int64_t display_id, bool success) const; | 87 void OnConfigureNativeDisplayCallback(int64_t display_id, bool success) const; |
| 89 void OnDisableNativeDisplayCallback(int64_t display_id, bool success) const; | 88 void OnDisableNativeDisplayCallback(int64_t display_id, bool success) const; |
| 90 void OnTakeDisplayControlCallback(bool success) const; | 89 void OnTakeDisplayControlCallback(bool success) const; |
| 91 void OnRelinquishDisplayControlCallback(bool success) const; | 90 void OnRelinquishDisplayControlCallback(bool success) const; |
| 92 void OnGetHDCPStateCallback(int64_t display_id, | 91 void OnGetHDCPStateCallback(int64_t display_id, |
| 93 bool success, | 92 bool success, |
| 94 display::HDCPState state) const; | 93 display::HDCPState state) const; |
| 95 void OnSetHDCPStateCallback(int64_t display_id, bool success) const; | 94 void OnSetHDCPStateCallback(int64_t display_id, bool success) const; |
| 96 | 95 |
| 97 DrmThread* drm_thread_; | 96 DrmThread* drm_thread_; |
| 98 | 97 |
| 99 IPC::Sender* sender_ = nullptr; | 98 IPC::Sender* sender_ = nullptr; |
| 100 | 99 |
| 101 base::WeakPtrFactory<DrmThreadMessageProxy> weak_ptr_factory_; | 100 base::WeakPtrFactory<DrmThreadMessageProxy> weak_ptr_factory_; |
| 102 | 101 |
| 103 DISALLOW_COPY_AND_ASSIGN(DrmThreadMessageProxy); | 102 DISALLOW_COPY_AND_ASSIGN(DrmThreadMessageProxy); |
| 104 }; | 103 }; |
| 105 | 104 |
| 106 } // namespace ui | 105 } // namespace ui |
| 107 | 106 |
| 108 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_MESSAGE_PROXY_H_ | 107 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_THREAD_MESSAGE_PROXY_H_ |
| OLD | NEW |