OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Multiply-included message header, no traditional include guard. | 5 // Multiply-included message header, no traditional include guard. |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/process/process.h" | 10 #include "base/process/process.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 IPC_STRUCT_MEMBER(gfx::Rect, view_rect) | 49 IPC_STRUCT_MEMBER(gfx::Rect, view_rect) |
50 // Indicates the scale factor of the embedder WebView. | 50 // Indicates the scale factor of the embedder WebView. |
51 IPC_STRUCT_MEMBER(float, scale_factor) | 51 IPC_STRUCT_MEMBER(float, scale_factor) |
52 // Indicates a request for a full repaint of the page. | 52 // Indicates a request for a full repaint of the page. |
53 // This is required for switching from compositing to the software | 53 // This is required for switching from compositing to the software |
54 // rendering path. | 54 // rendering path. |
55 IPC_STRUCT_MEMBER(bool, repaint) | 55 IPC_STRUCT_MEMBER(bool, repaint) |
56 IPC_STRUCT_END() | 56 IPC_STRUCT_END() |
57 | 57 |
58 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_Attach_Params) | 58 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_Attach_Params) |
59 IPC_STRUCT_MEMBER(std::string, storage_partition_id) | |
60 IPC_STRUCT_MEMBER(bool, persist_storage) | |
61 IPC_STRUCT_MEMBER(bool, focused) | 59 IPC_STRUCT_MEMBER(bool, focused) |
62 IPC_STRUCT_MEMBER(bool, visible) | 60 IPC_STRUCT_MEMBER(bool, visible) |
63 IPC_STRUCT_MEMBER(bool, opaque) | 61 IPC_STRUCT_MEMBER(bool, opaque) |
64 IPC_STRUCT_MEMBER(std::string, src) | |
65 IPC_STRUCT_MEMBER(GURL, embedder_frame_url) | 62 IPC_STRUCT_MEMBER(GURL, embedder_frame_url) |
66 IPC_STRUCT_MEMBER(BrowserPluginHostMsg_AutoSize_Params, auto_size_params) | 63 IPC_STRUCT_MEMBER(BrowserPluginHostMsg_AutoSize_Params, auto_size_params) |
67 IPC_STRUCT_MEMBER(BrowserPluginHostMsg_ResizeGuest_Params, | 64 IPC_STRUCT_MEMBER(BrowserPluginHostMsg_ResizeGuest_Params, |
68 resize_guest_params) | 65 resize_guest_params) |
69 IPC_STRUCT_END() | 66 IPC_STRUCT_END() |
70 | 67 |
71 IPC_STRUCT_BEGIN(BrowserPluginMsg_Attach_ACK_Params) | |
72 IPC_STRUCT_MEMBER(std::string, storage_partition_id) | |
73 IPC_STRUCT_MEMBER(bool, persist_storage) | |
74 IPC_STRUCT_END() | |
75 | |
76 IPC_STRUCT_BEGIN(BrowserPluginMsg_UpdateRect_Params) | 68 IPC_STRUCT_BEGIN(BrowserPluginMsg_UpdateRect_Params) |
77 // The size of the RenderView when this message was generated. This is | 69 // The size of the RenderView when this message was generated. This is |
78 // included so the host knows how large the view is from the perspective of | 70 // included so the host knows how large the view is from the perspective of |
79 // the renderer process. This is necessary in case a resize operation is in | 71 // the renderer process. This is necessary in case a resize operation is in |
80 // progress. If auto-resize is enabled, this should update the corresponding | 72 // progress. If auto-resize is enabled, this should update the corresponding |
81 // view size. | 73 // view size. |
82 IPC_STRUCT_MEMBER(gfx::Size, view_size) | 74 IPC_STRUCT_MEMBER(gfx::Size, view_size) |
83 | 75 |
84 // All the above coordinates are in DIP. This is the scale factor needed | 76 // All the above coordinates are in DIP. This is the scale factor needed |
85 // to convert them to pixels. | 77 // to convert them to pixels. |
86 IPC_STRUCT_MEMBER(float, scale_factor) | 78 IPC_STRUCT_MEMBER(float, scale_factor) |
87 | 79 |
88 // Is this UpdateRect an ACK to a resize request? | 80 // Is this UpdateRect an ACK to a resize request? |
89 IPC_STRUCT_MEMBER(bool, is_resize_ack) | 81 IPC_STRUCT_MEMBER(bool, is_resize_ack) |
90 IPC_STRUCT_END() | 82 IPC_STRUCT_END() |
91 | 83 |
92 // Browser plugin messages | 84 // Browser plugin messages |
93 | 85 |
94 // ----------------------------------------------------------------------------- | 86 // ----------------------------------------------------------------------------- |
95 // These messages are from the embedder to the browser process. | 87 // These messages are from the embedder to the browser process. |
96 | 88 |
97 // This message is sent to the browser process to request an instance ID. | |
98 // |request_id| is used by BrowserPluginEmbedder to route the response back | |
99 // to its origin. | |
100 IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_AllocateInstanceID, | |
101 int /* request_id */) | |
102 | |
103 // This message is sent from BrowserPlugin to BrowserPluginGuest to issue an | 89 // This message is sent from BrowserPlugin to BrowserPluginGuest to issue an |
104 // edit command. | 90 // edit command. |
105 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ExecuteEditCommand, | 91 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ExecuteEditCommand, |
106 int /* instance_id */, | 92 int /* instance_id */, |
107 std::string /* command */) | 93 std::string /* command */) |
108 | 94 |
109 // This message must be sent just before sending a key event. | 95 // This message must be sent just before sending a key event. |
110 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent, | 96 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetEditCommandsForNextKeyEvent, |
111 int /* instance_id */, | 97 int /* instance_id */, |
112 std::vector<content::EditCommand> /* edit_commands */) | 98 std::vector<content::EditCommand> /* edit_commands */) |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetFocus, | 143 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetFocus, |
158 int /* instance_id */, | 144 int /* instance_id */, |
159 bool /* enable */) | 145 bool /* enable */) |
160 | 146 |
161 // Sends an input event to the guest. | 147 // Sends an input event to the guest. |
162 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_HandleInputEvent, | 148 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_HandleInputEvent, |
163 int /* instance_id */, | 149 int /* instance_id */, |
164 gfx::Rect /* guest_window_rect */, | 150 gfx::Rect /* guest_window_rect */, |
165 IPC::WebInputEventPointer /* event */) | 151 IPC::WebInputEventPointer /* event */) |
166 | 152 |
167 // A BrowserPlugin sends this to BrowserPluginEmbedder (browser process) when it | |
168 // wants to navigate to a given src URL. If a guest WebContents already exists, | |
169 // it will navigate that WebContents. If not, it will create the WebContents, | |
170 // associate it with the BrowserPluginGuest, and navigate it to the requested | |
171 // URL. | |
172 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_NavigateGuest, | |
173 int /* instance_id*/, | |
174 std::string /* src */) | |
175 | |
176 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_CopyFromCompositingSurfaceAck, | 153 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_CopyFromCompositingSurfaceAck, |
177 int /* instance_id */, | 154 int /* instance_id */, |
178 int /* request_id */, | 155 int /* request_id */, |
179 SkBitmap); | 156 SkBitmap); |
180 | 157 |
181 // Notify the guest renderer that some resources given to the embededer | 158 // Notify the guest renderer that some resources given to the embededer |
182 // are not used any more. | 159 // are not used any more. |
183 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ReclaimCompositorResources, | 160 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ReclaimCompositorResources, |
184 int /* instance_id */, | 161 int /* instance_id */, |
185 FrameHostMsg_ReclaimCompositorResources_Params /* params */) | 162 FrameHostMsg_ReclaimCompositorResources_Params /* params */) |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 // A embedder sends this message to the browser when it wants | 203 // A embedder sends this message to the browser when it wants |
227 // to resize a guest plugin container so that the guest is relaid out | 204 // to resize a guest plugin container so that the guest is relaid out |
228 // according to the new size. | 205 // according to the new size. |
229 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ResizeGuest, | 206 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ResizeGuest, |
230 int /* instance_id*/, | 207 int /* instance_id*/, |
231 BrowserPluginHostMsg_ResizeGuest_Params) | 208 BrowserPluginHostMsg_ResizeGuest_Params) |
232 | 209 |
233 // ----------------------------------------------------------------------------- | 210 // ----------------------------------------------------------------------------- |
234 // These messages are from the browser process to the embedder. | 211 // These messages are from the browser process to the embedder. |
235 | 212 |
236 // This message is sent from the browser process to the embedder render process | |
237 // in response to a request to allocate an instance ID. The |request_id| is used | |
238 // to route the response to the requestor. | |
239 IPC_MESSAGE_ROUTED2(BrowserPluginMsg_AllocateInstanceID_ACK, | |
240 int /* request_id */, | |
241 int /* instance_id */) | |
242 | |
243 // This message is sent in response to a completed attachment of a guest | 213 // This message is sent in response to a completed attachment of a guest |
244 // to a BrowserPlugin. This message carries information about the guest | 214 // to a BrowserPlugin. |
245 // that is used to update the attributes of the browser plugin. | 215 IPC_MESSAGE_CONTROL1(BrowserPluginMsg_Attach_ACK, int /* instance_id */); |
246 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_Attach_ACK, | |
247 int /* instance_id */, | |
248 BrowserPluginMsg_Attach_ACK_Params /* params */) | |
249 | 216 |
250 // Once the swapped out guest RenderView has been created in the embedder render | 217 // Once the swapped out guest RenderView has been created in the embedder render |
251 // process, the browser process informs the embedder of its routing ID. | 218 // process, the browser process informs the embedder of its routing ID. |
252 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_GuestContentWindowReady, | 219 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_GuestContentWindowReady, |
253 int /* instance_id */, | 220 int /* instance_id */, |
254 int /* source_routing_id */) | 221 int /* source_routing_id */) |
255 | 222 |
256 // When the guest crashes, the browser process informs the embedder through this | 223 // When the guest crashes, the browser process informs the embedder through this |
257 // message. | 224 // message. |
258 IPC_MESSAGE_CONTROL1(BrowserPluginMsg_GuestGone, | 225 IPC_MESSAGE_CONTROL1(BrowserPluginMsg_GuestGone, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 // See comment about BrowserPluginMsg_BuffersSwapped and | 275 // See comment about BrowserPluginMsg_BuffersSwapped and |
309 // BrowserPluginMsg_CompositorFrameSwapped for how these related | 276 // BrowserPluginMsg_CompositorFrameSwapped for how these related |
310 // to the FrameHostMsg variants. | 277 // to the FrameHostMsg variants. |
311 IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_BuffersSwappedACK, | 278 IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_BuffersSwappedACK, |
312 FrameHostMsg_BuffersSwappedACK_Params /* params */) | 279 FrameHostMsg_BuffersSwappedACK_Params /* params */) |
313 | 280 |
314 // Acknowledge that we presented an ubercomp frame. | 281 // Acknowledge that we presented an ubercomp frame. |
315 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_CompositorFrameSwappedACK, | 282 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_CompositorFrameSwappedACK, |
316 int /* instance_id */, | 283 int /* instance_id */, |
317 FrameHostMsg_CompositorFrameSwappedACK_Params /* params */) | 284 FrameHostMsg_CompositorFrameSwappedACK_Params /* params */) |
OLD | NEW |