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 // IPC messages for GuestViews. | 5 // IPC messages for GuestViews. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
8 #include <string> | |
9 | |
10 #include "base/values.h" | 8 #include "base/values.h" |
11 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
12 #include "ui/gfx/geometry/size.h" | |
13 #include "ui/gfx/ipc/gfx_param_traits.h" | |
14 | 10 |
15 #define IPC_MESSAGE_START GuestViewMsgStart | 11 #define IPC_MESSAGE_START GuestViewMsgStart |
16 | 12 |
17 // Messages sent from the browser to the renderer. | 13 // Messages sent from the browser to the renderer. |
18 | 14 |
19 // The ACK for GuestViewHostMsg_CreateMimeHandlerViewGuest. | |
20 IPC_MESSAGE_CONTROL1(GuestViewMsg_CreateMimeHandlerViewGuestACK, | |
21 int /* element_instance_id */) | |
22 | |
23 // Once a MimeHandlerView guest's JavaScript onload function has been called, | |
24 // this IPC is sent to the container to notify it. | |
25 IPC_MESSAGE_CONTROL1(GuestViewMsg_MimeHandlerViewGuestOnLoadCompleted, | |
26 int /* element_instance_id */) | |
27 | |
28 // Once a RenderView proxy has been created for the guest in the embedder render | 15 // Once a RenderView proxy has been created for the guest in the embedder render |
29 // process, this IPC informs the embedder of the proxy's routing ID. | 16 // process, this IPC informs the embedder of the proxy's routing ID. |
30 IPC_MESSAGE_CONTROL2(GuestViewMsg_GuestAttached, | 17 IPC_MESSAGE_CONTROL2(GuestViewMsg_GuestAttached, |
31 int /* element_instance_id */, | 18 int /* element_instance_id */, |
32 int /* source_routing_id */) | 19 int /* source_routing_id */) |
33 | 20 |
34 // This IPC tells the browser process to detach the provided | 21 // This IPC tells the browser process to detach the provided |
35 // |element_instance_id| from a GuestViewBase if it is attached to one. | 22 // |element_instance_id| from a GuestViewBase if it is attached to one. |
36 // In other words, routing of input and graphics will no longer flow through | 23 // In other words, routing of input and graphics will no longer flow through |
37 // the container associated with the provided ID. | 24 // the container associated with the provided ID. |
38 IPC_MESSAGE_CONTROL1(GuestViewMsg_GuestDetached, | 25 IPC_MESSAGE_CONTROL1(GuestViewMsg_GuestDetached, |
39 int /* element_instance_id*/) | 26 int /* element_instance_id*/) |
40 | 27 |
41 // Messages sent from the renderer to the browser. | 28 // Messages sent from the renderer to the browser. |
42 | 29 |
43 // Sent by the renderer to set initialization parameters of a Browser Plugin | 30 // Sent by the renderer to set initialization parameters of a Browser Plugin |
44 // that is identified by |element_instance_id|. | 31 // that is identified by |element_instance_id|. |
45 IPC_MESSAGE_CONTROL3(GuestViewHostMsg_AttachGuest, | 32 IPC_MESSAGE_CONTROL3(GuestViewHostMsg_AttachGuest, |
46 int /* element_instance_id */, | 33 int /* element_instance_id */, |
47 int /* guest_instance_id */, | 34 int /* guest_instance_id */, |
48 base::DictionaryValue /* attach_params */) | 35 base::DictionaryValue /* attach_params */) |
49 | |
50 // Tells the browser to create a mime handler guest view for a plugin. | |
51 IPC_MESSAGE_CONTROL4(GuestViewHostMsg_CreateMimeHandlerViewGuest, | |
52 int /* render_frame_id */, | |
53 std::string /* view_id */, | |
54 int /* element_instance_id */, | |
55 gfx::Size /* element_size */) | |
56 | |
57 // A renderer sends this message when it wants to resize a guest. | |
58 IPC_MESSAGE_CONTROL3(GuestViewHostMsg_ResizeGuest, | |
59 int /* routing_id */, | |
60 int /* element_instance_id*/, | |
61 gfx::Size /* new_size */) | |
62 | |
63 IPC_SYNC_MESSAGE_CONTROL2_1(GuestViewHostMsg_CanExecuteContentScriptSync, | |
64 int /* routing_id */, | |
65 int /* script_id */, | |
66 bool /* allowed */) | |
OLD | NEW |