| 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 extensions GuestViews. | 5 // IPC messages for extensions GuestViews. |
| 6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
| 11 #include "ui/gfx/geometry/size.h" | 11 #include "ui/gfx/geometry/size.h" |
| 12 #include "ui/gfx/ipc/gfx_param_traits.h" | 12 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 13 | 13 |
| 14 #define IPC_MESSAGE_START ExtensionsGuestViewMsgStart | 14 #define IPC_MESSAGE_START ExtensionsGuestViewMsgStart |
| 15 // Messages sent from the browser to the renderer. | 15 // Messages sent from the browser to the renderer. |
| 16 | 16 |
| 17 // The ACK for GuestViewHostMsg_CreateMimeHandlerViewGuest. | 17 // The ACK for GuestViewHostMsg_CreateMimeHandlerViewGuest. |
| 18 IPC_MESSAGE_CONTROL1(ExtensionsGuestViewMsg_CreateMimeHandlerViewGuestACK, | 18 IPC_MESSAGE_CONTROL1(ExtensionsGuestViewMsg_CreateMimeHandlerViewGuestACK, |
| 19 int /* element_instance_id */) | 19 int /* element_instance_id */) |
| 20 | 20 |
| 21 // Once a MimeHandlerView guest's JavaScript onload function has been called, | 21 // Once a MimeHandlerView guest's JavaScript onload function has been called, |
| 22 // this IPC is sent to the container to notify it. | 22 // this IPC is sent to the container to notify it. |
| 23 IPC_MESSAGE_CONTROL1(ExtensionsGuestViewMsg_MimeHandlerViewGuestOnLoadCompleted, | 23 IPC_MESSAGE_CONTROL1(ExtensionsGuestViewMsg_MimeHandlerViewGuestOnLoadCompleted, |
| 24 int /* element_instance_id */) | 24 int /* element_instance_id */) |
| 25 | 25 |
| 26 // Tells a <webview> that its contentWindow is ready to be exposed. |
| 27 // The contentWindow should point to the RenderFrameProxy with routing |
| 28 // ID of |guest_proxy_routing_id|. |
| 29 IPC_MESSAGE_CONTROL2(ExtensionsGuestViewMsg_ContentWindowReady, |
| 30 int /* element_instance_id */, |
| 31 int /* guest_proxy_routing_id */) |
| 32 |
| 26 // Messages sent from the renderer to the browser. | 33 // Messages sent from the renderer to the browser. |
| 27 | 34 |
| 35 // We have a RenderFrame with routing id of |embedder_local_frame_routing_id|. |
| 36 // We want this local frame to be replaced with a remote frame that points |
| 37 // to a <webview>. This message will attach the local frame to the <webview> |
| 38 // guest. The <webview> is identified by its ID: |guest_instance_id|. |
| 39 IPC_MESSAGE_CONTROL3(ExtensionsGuestViewHostMsg_AttachLocalFrameToGuest, |
| 40 int /* embedder_local_frame_routing_id */, |
| 41 int /* element_instance_id */, |
| 42 int /* guest_instance_id */) |
| 43 |
| 28 // Queries whether the RenderView of the provided |routing_id| is allowed to | 44 // Queries whether the RenderView of the provided |routing_id| is allowed to |
| 29 // inject the script with the provided |script_id|. | 45 // inject the script with the provided |script_id|. |
| 30 IPC_SYNC_MESSAGE_CONTROL2_1( | 46 IPC_SYNC_MESSAGE_CONTROL2_1( |
| 31 ExtensionsGuestViewHostMsg_CanExecuteContentScriptSync, | 47 ExtensionsGuestViewHostMsg_CanExecuteContentScriptSync, |
| 32 int /* routing_id */, | 48 int /* routing_id */, |
| 33 int /* script_id */, | 49 int /* script_id */, |
| 34 bool /* allowed */) | 50 bool /* allowed */) |
| 35 | 51 |
| 36 // Tells the browser to create a mime handler guest view for a plugin. | 52 // Tells the browser to create a mime handler guest view for a plugin. |
| 37 IPC_MESSAGE_CONTROL4(ExtensionsGuestViewHostMsg_CreateMimeHandlerViewGuest, | 53 IPC_MESSAGE_CONTROL4(ExtensionsGuestViewHostMsg_CreateMimeHandlerViewGuest, |
| 38 int /* render_frame_id */, | 54 int /* render_frame_id */, |
| 39 std::string /* view_id */, | 55 std::string /* view_id */, |
| 40 int /* element_instance_id */, | 56 int /* element_instance_id */, |
| 41 gfx::Size /* element_size */) | 57 gfx::Size /* element_size */) |
| 42 | 58 |
| 43 // A renderer sends this message when it wants to resize a guest. | 59 // A renderer sends this message when it wants to resize a guest. |
| 44 IPC_MESSAGE_CONTROL3(ExtensionsGuestViewHostMsg_ResizeGuest, | 60 IPC_MESSAGE_CONTROL3(ExtensionsGuestViewHostMsg_ResizeGuest, |
| 45 int /* routing_id */, | 61 int /* routing_id */, |
| 46 int /* element_instance_id*/, | 62 int /* element_instance_id*/, |
| 47 gfx::Size /* new_size */) | 63 gfx::Size /* new_size */) |
| OLD | NEW |