OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_OZONE_PLATFORM_DRM_HOST_DRM_GPU_COMMON_INPROCESS_MESSAGES_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_HOST_DRM_GPU_COMMON_INPROCESS_MESSAGES_H_ |
| 7 |
| 8 #include "base/file_descriptor_posix.h" |
| 9 #include "base/files/file_path.h" |
| 10 #include "ui/gfx/geometry/rect.h" |
| 11 #include "ui/gfx/native_widget_types.h" |
| 12 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" |
| 13 |
| 14 namespace ui { |
| 15 |
| 16 enum MessageId { |
| 17 OZONE_GPU_MSG__CREATE_WINDOW = 1000, |
| 18 OZONE_GPU_MSG__WINDOW_BOUNDS_CHANGED, |
| 19 OZONE_GPU_MSG__ADD_GRAPHICS_DEVICE, |
| 20 OZONE_GPU_MSG__REFRESH_NATIVE_DISPLAYS, |
| 21 OZONE_GPU_MSG__CONFIGURE_NATIVE_DISPLAY, |
| 22 |
| 23 OZONE_HOST_MSG__UPDATE_NATIVE_DISPLAYS = 2000, |
| 24 OZONE_HOST_MSG__DISPLAY_CONFIGURED, |
| 25 OZONE_HOST_MSG__HDCP_STATE_RECEIVED, |
| 26 }; |
| 27 |
| 28 class Message { |
| 29 public: |
| 30 Message(MessageId _id) |
| 31 : id(_id) { |
| 32 } |
| 33 const MessageId id; |
| 34 }; |
| 35 |
| 36 class OzoneGpuMsg_CreateWindow : public Message { |
| 37 public: |
| 38 OzoneGpuMsg_CreateWindow(const gfx::AcceleratedWidget& _widget) |
| 39 : Message(OZONE_GPU_MSG__CREATE_WINDOW), |
| 40 widget(_widget) { |
| 41 } |
| 42 const gfx::AcceleratedWidget widget; |
| 43 }; |
| 44 |
| 45 class OzoneGpuMsg_WindowBoundsChanged : public Message { |
| 46 public: |
| 47 OzoneGpuMsg_WindowBoundsChanged(const gfx::AcceleratedWidget& _widget, |
| 48 const gfx::Rect& _bounds) |
| 49 : Message(OZONE_GPU_MSG__WINDOW_BOUNDS_CHANGED), |
| 50 widget(_widget), bounds(_bounds) { |
| 51 } |
| 52 const gfx::AcceleratedWidget widget; |
| 53 const gfx::Rect bounds; |
| 54 }; |
| 55 |
| 56 class OzoneGpuMsg_AddGraphicsDevice : public Message { |
| 57 public: |
| 58 OzoneGpuMsg_AddGraphicsDevice(const base::FilePath& _path, |
| 59 const base::FileDescriptor& _fd) |
| 60 : Message(OZONE_GPU_MSG__ADD_GRAPHICS_DEVICE), |
| 61 path(_path), fd(_fd) { |
| 62 } |
| 63 const base::FilePath path; |
| 64 const base::FileDescriptor fd; |
| 65 }; |
| 66 |
| 67 class OzoneGpuMsg_RefreshNativeDisplays : public Message { |
| 68 public: |
| 69 OzoneGpuMsg_RefreshNativeDisplays() |
| 70 : Message(OZONE_GPU_MSG__REFRESH_NATIVE_DISPLAYS) { |
| 71 } |
| 72 }; |
| 73 |
| 74 class OzoneGpuMsg_ConfigureNativeDisplay : public Message { |
| 75 public: |
| 76 OzoneGpuMsg_ConfigureNativeDisplay(int64_t _id, |
| 77 const DisplayMode_Params& _mode, |
| 78 const gfx::Point& _originhost) |
| 79 : Message(OZONE_GPU_MSG__CONFIGURE_NATIVE_DISPLAY) |
| 80 , id(_id), mode(_mode), originhost(_originhost) { |
| 81 } |
| 82 const int64_t id; |
| 83 const DisplayMode_Params mode; |
| 84 const gfx::Point originhost; |
| 85 }; |
| 86 |
| 87 |
| 88 class OzoneHostMsg_UpdateNativeDisplays : public Message { |
| 89 public: |
| 90 OzoneHostMsg_UpdateNativeDisplays( |
| 91 const std::vector<DisplaySnapshot_Params>& _displays); |
| 92 ~OzoneHostMsg_UpdateNativeDisplays(); |
| 93 |
| 94 const std::vector<DisplaySnapshot_Params> displays; |
| 95 }; |
| 96 |
| 97 class OzoneHostMsg_DisplayConfigured : public Message { |
| 98 public: |
| 99 OzoneHostMsg_DisplayConfigured(int64_t _id, bool _result) |
| 100 : Message(OZONE_HOST_MSG__DISPLAY_CONFIGURED) |
| 101 , id(_id), result(_result) { |
| 102 } |
| 103 const int64_t id; |
| 104 const bool result; |
| 105 }; |
| 106 |
| 107 } // namespace |
| 108 |
| 109 #endif |
OLD | NEW |