| 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 "base/values.h" | 8 #include "base/values.h" |
| 9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
| 10 | 10 |
| 11 #define IPC_MESSAGE_START GuestViewMsgStart | 11 #define IPC_MESSAGE_START GuestViewMsgStart |
| 12 | 12 |
| 13 // Messages sent from the browser to the renderer. | 13 // Messages sent from the browser to the renderer. |
| 14 | 14 |
| 15 // Tells the embedder that a guest has been attached in --site-per-process mode. |
| 16 IPC_MESSAGE_CONTROL1(GuestViewMsg_AttachToEmbedderFrame_ACK, |
| 17 int /* element_instance_id */) |
| 18 |
| 15 // Once a RenderView proxy has been created for the guest in the embedder render | 19 // Once a RenderView proxy has been created for the guest in the embedder render |
| 16 // process, this IPC informs the embedder of the proxy's routing ID. | 20 // process, this IPC informs the embedder of the proxy's routing ID. |
| 17 IPC_MESSAGE_CONTROL2(GuestViewMsg_GuestAttached, | 21 IPC_MESSAGE_CONTROL2(GuestViewMsg_GuestAttached, |
| 18 int /* element_instance_id */, | 22 int /* element_instance_id */, |
| 19 int /* source_routing_id */) | 23 int /* source_routing_id */) |
| 20 | 24 |
| 21 // This IPC tells the browser process to detach the provided | 25 // This IPC tells the browser process to detach the provided |
| 22 // |element_instance_id| from a GuestViewBase if it is attached to one. | 26 // |element_instance_id| from a GuestViewBase if it is attached to one. |
| 23 // In other words, routing of input and graphics will no longer flow through | 27 // In other words, routing of input and graphics will no longer flow through |
| 24 // the container associated with the provided ID. | 28 // the container associated with the provided ID. |
| 25 IPC_MESSAGE_CONTROL1(GuestViewMsg_GuestDetached, | 29 IPC_MESSAGE_CONTROL1(GuestViewMsg_GuestDetached, |
| 26 int /* element_instance_id*/) | 30 int /* element_instance_id*/) |
| 27 | 31 |
| 28 // Messages sent from the renderer to the browser. | 32 // Messages sent from the renderer to the browser. |
| 29 | 33 |
| 30 // Sent by the renderer to set initialization parameters of a Browser Plugin | 34 // Sent by the renderer to set initialization parameters of a Browser Plugin |
| 31 // that is identified by |element_instance_id|. | 35 // that is identified by |element_instance_id|. |
| 32 IPC_MESSAGE_CONTROL3(GuestViewHostMsg_AttachGuest, | 36 IPC_MESSAGE_CONTROL3(GuestViewHostMsg_AttachGuest, |
| 33 int /* element_instance_id */, | 37 int /* element_instance_id */, |
| 34 int /* guest_instance_id */, | 38 int /* guest_instance_id */, |
| 35 base::DictionaryValue /* attach_params */) | 39 base::DictionaryValue /* attach_params */) |
| 36 | 40 |
| 41 // We have a RenderFrame with routing id of |embedder_local_frame_routing_id|. |
| 42 // We want this local frame to be replaced with a remote frame that points |
| 43 // to a GuestView. This message will attach the local frame to the guest. |
| 44 // The GuestView is identified by its ID: |guest_instance_id|. |
| 45 IPC_MESSAGE_CONTROL4(GuestViewHostMsg_AttachToEmbedderFrame, |
| 46 int /* embedder_local_frame_routing_id */, |
| 47 int /* element_instance_id */, |
| 48 int /* guest_instance_id */, |
| 49 base::DictionaryValue /* params */) |
| 50 |
| 37 // Sent by the renderer when a GuestView (identified by |view_instance_id|) has | 51 // Sent by the renderer when a GuestView (identified by |view_instance_id|) has |
| 38 // been created in JavaScript. | 52 // been created in JavaScript. |
| 39 IPC_MESSAGE_CONTROL2(GuestViewHostMsg_ViewCreated, | 53 IPC_MESSAGE_CONTROL2(GuestViewHostMsg_ViewCreated, |
| 40 int /* view_instance_id */, | 54 int /* view_instance_id */, |
| 41 std::string /* view_type */) | 55 std::string /* view_type */) |
| 42 | 56 |
| 43 // Sent by the renderer when a GuestView (identified by |view_instance_id|) has | 57 // Sent by the renderer when a GuestView (identified by |view_instance_id|) has |
| 44 // been garbage collected in JavaScript. | 58 // been garbage collected in JavaScript. |
| 45 IPC_MESSAGE_CONTROL1(GuestViewHostMsg_ViewGarbageCollected, | 59 IPC_MESSAGE_CONTROL1(GuestViewHostMsg_ViewGarbageCollected, |
| 46 int /* view_instance_id */) | 60 int /* view_instance_id */) |
| OLD | NEW |