| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Multiply-included message file, hence no include guard here, but see below | |
| 6 // for a much smaller-than-usual include guard section. | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "ipc/ipc_message_macros.h" | |
| 11 #include "third_party/skia/include/core/SkBitmap.h" | |
| 12 #include "ui/gfx/geometry/point.h" | |
| 13 #include "ui/gfx/geometry/rect.h" | |
| 14 #include "ui/gfx/ipc/gfx_param_traits.h" | |
| 15 #include "ui/gfx/native_widget_types.h" | |
| 16 #include "ui/ozone/common/gpu/ozone_gpu_message_params.h" | |
| 17 #include "ui/ozone/ozone_export.h" | |
| 18 | |
| 19 #undef IPC_MESSAGE_EXPORT | |
| 20 #define IPC_MESSAGE_EXPORT OZONE_EXPORT | |
| 21 | |
| 22 #define IPC_MESSAGE_START OzoneGpuMsgStart | |
| 23 | |
| 24 IPC_ENUM_TRAITS_MAX_VALUE(ui::DisplayConnectionType, | |
| 25 ui::DISPLAY_CONNECTION_TYPE_LAST) | |
| 26 | |
| 27 IPC_STRUCT_TRAITS_BEGIN(ui::DisplayMode_Params) | |
| 28 IPC_STRUCT_TRAITS_MEMBER(size) | |
| 29 IPC_STRUCT_TRAITS_MEMBER(is_interlaced) | |
| 30 IPC_STRUCT_TRAITS_MEMBER(refresh_rate) | |
| 31 IPC_STRUCT_TRAITS_END() | |
| 32 | |
| 33 IPC_STRUCT_TRAITS_BEGIN(ui::DisplaySnapshot_Params) | |
| 34 IPC_STRUCT_TRAITS_MEMBER(display_id) | |
| 35 IPC_STRUCT_TRAITS_MEMBER(has_proper_display_id) | |
| 36 IPC_STRUCT_TRAITS_MEMBER(origin) | |
| 37 IPC_STRUCT_TRAITS_MEMBER(physical_size) | |
| 38 IPC_STRUCT_TRAITS_MEMBER(type) | |
| 39 IPC_STRUCT_TRAITS_MEMBER(is_aspect_preserving_scaling) | |
| 40 IPC_STRUCT_TRAITS_MEMBER(has_overscan) | |
| 41 IPC_STRUCT_TRAITS_MEMBER(display_name) | |
| 42 IPC_STRUCT_TRAITS_MEMBER(modes) | |
| 43 IPC_STRUCT_TRAITS_MEMBER(has_current_mode) | |
| 44 IPC_STRUCT_TRAITS_MEMBER(current_mode) | |
| 45 IPC_STRUCT_TRAITS_MEMBER(has_native_mode) | |
| 46 IPC_STRUCT_TRAITS_MEMBER(native_mode) | |
| 47 IPC_STRUCT_TRAITS_MEMBER(string_representation) | |
| 48 IPC_STRUCT_TRAITS_END() | |
| 49 | |
| 50 //------------------------------------------------------------------------------ | |
| 51 // GPU Messages | |
| 52 // These are messages from the browser to the GPU process. | |
| 53 | |
| 54 // Update the HW cursor bitmap & move to specified location. | |
| 55 IPC_MESSAGE_CONTROL4(OzoneGpuMsg_CursorSet, | |
| 56 gfx::AcceleratedWidget, | |
| 57 std::vector<SkBitmap>, | |
| 58 gfx::Point /* location */, | |
| 59 int /* frame_delay_ms */) | |
| 60 | |
| 61 // Move the HW cursor to the specified location. | |
| 62 IPC_MESSAGE_CONTROL2(OzoneGpuMsg_CursorMove, | |
| 63 gfx::AcceleratedWidget, gfx::Point) | |
| 64 | |
| 65 // Explicit creation of a WindowDelegate. We explicitly create the window | |
| 66 // delegate such that any state change in the window is not lost while the | |
| 67 // surface is created on the GPU side. | |
| 68 IPC_MESSAGE_CONTROL1(OzoneGpuMsg_CreateWindowDelegate, | |
| 69 gfx::AcceleratedWidget /* widget */) | |
| 70 | |
| 71 IPC_MESSAGE_CONTROL1(OzoneGpuMsg_DestroyWindowDelegate, | |
| 72 gfx::AcceleratedWidget /* widget */) | |
| 73 | |
| 74 // Updates the location and size of the widget on the screen. | |
| 75 IPC_MESSAGE_CONTROL2(OzoneGpuMsg_WindowBoundsChanged, | |
| 76 gfx::AcceleratedWidget /* widget */, | |
| 77 gfx::Rect /* bounds */) | |
| 78 | |
| 79 // Force the DPMS state of the display to on. | |
| 80 IPC_MESSAGE_CONTROL0(OzoneGpuMsg_ForceDPMSOn) | |
| 81 | |
| 82 // Trigger a display reconfiguration. OzoneHostMsg_UpdateNativeDisplays will be | |
| 83 // sent as a response. | |
| 84 // The |displays| parameter will hold a list of last known displays. | |
| 85 IPC_MESSAGE_CONTROL1(OzoneGpuMsg_RefreshNativeDisplays, | |
| 86 std::vector<ui::DisplaySnapshot_Params> /* displays */) | |
| 87 | |
| 88 // Configure a display with the specified mode at the specified location. | |
| 89 IPC_MESSAGE_CONTROL3(OzoneGpuMsg_ConfigureNativeDisplay, | |
| 90 int64_t, // display ID | |
| 91 ui::DisplayMode_Params, // display mode | |
| 92 gfx::Point) // origin for the display | |
| 93 | |
| 94 IPC_MESSAGE_CONTROL1(OzoneGpuMsg_DisableNativeDisplay, | |
| 95 int64_t) // display ID | |
| 96 | |
| 97 //------------------------------------------------------------------------------ | |
| 98 // Browser Messages | |
| 99 // These messages are from the GPU to the browser process. | |
| 100 | |
| 101 // Updates the list of active displays. | |
| 102 IPC_MESSAGE_CONTROL1(OzoneHostMsg_UpdateNativeDisplays, | |
| 103 std::vector<ui::DisplaySnapshot_Params>) | |
| OLD | NEW |