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/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
11 #include "base/process/process.h" | 11 #include "base/process/process.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "cc/output/compositor_frame.h" | 13 #include "cc/output/compositor_frame.h" |
14 #include "cc/output/compositor_frame_ack.h" | 14 #include "cc/output/compositor_frame_ack.h" |
15 #include "content/common/browser_plugin/browser_plugin_message_enums.h" | |
16 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
17 #include "content/common/content_param_traits.h" | 16 #include "content/common/content_param_traits.h" |
18 #include "content/common/edit_command.h" | 17 #include "content/common/edit_command.h" |
| 18 #include "content/public/common/browser_plugin/browser_plugin_message_enums.h" |
19 #include "content/public/common/common_param_traits.h" | 19 #include "content/public/common/common_param_traits.h" |
20 #include "content/public/common/drop_data.h" | 20 #include "content/public/common/drop_data.h" |
21 #include "ipc/ipc_channel_handle.h" | 21 #include "ipc/ipc_channel_handle.h" |
22 #include "ipc/ipc_message_macros.h" | 22 #include "ipc/ipc_message_macros.h" |
23 #include "ipc/ipc_message_utils.h" | 23 #include "ipc/ipc_message_utils.h" |
24 #include "third_party/WebKit/public/web/WebDragOperation.h" | 24 #include "third_party/WebKit/public/web/WebDragOperation.h" |
25 #include "third_party/WebKit/public/web/WebDragStatus.h" | 25 #include "third_party/WebKit/public/web/WebDragStatus.h" |
26 #include "ui/gfx/point.h" | 26 #include "ui/gfx/point.h" |
27 #include "ui/gfx/rect.h" | 27 #include "ui/gfx/rect.h" |
28 #include "ui/gfx/size.h" | 28 #include "ui/gfx/size.h" |
29 #include "webkit/common/cursors/webcursor.h" | 29 #include "webkit/common/cursors/webcursor.h" |
30 | 30 |
31 #undef IPC_MESSAGE_EXPORT | 31 #undef IPC_MESSAGE_EXPORT |
32 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 32 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
33 | 33 |
34 #define IPC_MESSAGE_START BrowserPluginMsgStart | 34 #define IPC_MESSAGE_START BrowserPluginMsgStart |
35 | 35 |
36 | 36 |
37 IPC_ENUM_TRAITS(BrowserPluginPermissionType) | |
38 IPC_ENUM_TRAITS(WebKit::WebDragStatus) | 37 IPC_ENUM_TRAITS(WebKit::WebDragStatus) |
39 | 38 |
40 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_AutoSize_Params) | 39 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_AutoSize_Params) |
41 IPC_STRUCT_MEMBER(bool, enable) | 40 IPC_STRUCT_MEMBER(bool, enable) |
42 IPC_STRUCT_MEMBER(gfx::Size, max_size) | 41 IPC_STRUCT_MEMBER(gfx::Size, max_size) |
43 IPC_STRUCT_MEMBER(gfx::Size, min_size) | 42 IPC_STRUCT_MEMBER(gfx::Size, min_size) |
44 IPC_STRUCT_END() | 43 IPC_STRUCT_END() |
45 | 44 |
46 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_ResizeGuest_Params) | 45 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_ResizeGuest_Params) |
47 // Indicates whether the parameters have been populated or not. | 46 // Indicates whether the parameters have been populated or not. |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_PluginAtPositionResponse, | 240 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_PluginAtPositionResponse, |
242 int /* instance_id */, | 241 int /* instance_id */, |
243 int /* request_id */, | 242 int /* request_id */, |
244 gfx::Point /* position */) | 243 gfx::Point /* position */) |
245 | 244 |
246 // Sets the name of the guest window to the provided |name|. | 245 // Sets the name of the guest window to the provided |name|. |
247 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetName, | 246 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetName, |
248 int /* instance_id */, | 247 int /* instance_id */, |
249 std::string /* name */) | 248 std::string /* name */) |
250 | 249 |
251 // Tells the guest that its request for an API permission has been allowed or | |
252 // denied. | |
253 // Note that |allow| = true does not readily mean that the guest will be granted | |
254 // permission, since a security check in the embedder might follow. For example | |
255 // for media access permission, the guest will be granted permission only if its | |
256 // embedder also has access. For certain APIs, such as the Dialog API, | |
257 // additional information may be passed by the developer through |user_input|. | |
258 IPC_MESSAGE_ROUTED4(BrowserPluginHostMsg_RespondPermission, | |
259 int /* instance_id */, | |
260 int /* request_id */, | |
261 bool /* allow */, | |
262 std::string /* user_input */) | |
263 | |
264 // Sends a PointerLock Lock ACK to the BrowserPluginGuest. | 250 // Sends a PointerLock Lock ACK to the BrowserPluginGuest. |
265 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_LockMouse_ACK, | 251 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_LockMouse_ACK, |
266 int /* instance_id */, | 252 int /* instance_id */, |
267 bool /* succeeded */) | 253 bool /* succeeded */) |
268 | 254 |
269 // Sends a PointerLock Unlock ACK to the BrowserPluginGuest. | 255 // Sends a PointerLock Unlock ACK to the BrowserPluginGuest. |
270 IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_UnlockMouse_ACK, int /* instance_id */) | 256 IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_UnlockMouse_ACK, int /* instance_id */) |
271 | 257 |
272 // Sent when plugin's position has changed without UpdateRect. | 258 // Sent when plugin's position has changed without UpdateRect. |
273 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_UpdateGeometry, | 259 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_UpdateGeometry, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 int /* instance_id */, | 342 int /* instance_id */, |
357 BrowserPluginMsg_BuffersSwapped_Params) | 343 BrowserPluginMsg_BuffersSwapped_Params) |
358 | 344 |
359 IPC_MESSAGE_CONTROL5(BrowserPluginMsg_CompositorFrameSwapped, | 345 IPC_MESSAGE_CONTROL5(BrowserPluginMsg_CompositorFrameSwapped, |
360 int /* instance_id */, | 346 int /* instance_id */, |
361 cc::CompositorFrame /* frame */, | 347 cc::CompositorFrame /* frame */, |
362 int /* route_id */, | 348 int /* route_id */, |
363 uint32 /* output_surface_id */, | 349 uint32 /* output_surface_id */, |
364 int /* renderer_host_id */) | 350 int /* renderer_host_id */) |
365 | 351 |
366 // When the guest requests permission, the browser process forwards this | |
367 // request to the embeddder through this message. | |
368 IPC_MESSAGE_CONTROL4(BrowserPluginMsg_RequestPermission, | |
369 int /* instance_id */, | |
370 BrowserPluginPermissionType /* permission_type */, | |
371 int /* request_id */, | |
372 base::DictionaryValue /* request_info */) | |
373 | |
374 // Forwards a PointerLock Unlock request to the BrowserPlugin. | 352 // Forwards a PointerLock Unlock request to the BrowserPlugin. |
375 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_SetMouseLock, | 353 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_SetMouseLock, |
376 int /* instance_id */, | 354 int /* instance_id */, |
377 bool /* enable */) | 355 bool /* enable */) |
378 | 356 |
OLD | NEW |