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.h" | 10 #include "base/process.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 // An ACK to the guest process letting it know that the embedder has handled | 58 // An ACK to the guest process letting it know that the embedder has handled |
59 // the previous frame and is ready for the next frame. If the guest sent the | 59 // the previous frame and is ready for the next frame. If the guest sent the |
60 // embedder a bitmap that does not match the size of the BrowserPlugin's | 60 // embedder a bitmap that does not match the size of the BrowserPlugin's |
61 // container, the BrowserPlugin requests a new size as well. | 61 // container, the BrowserPlugin requests a new size as well. |
62 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_UpdateRect_ACK, | 62 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_UpdateRect_ACK, |
63 int /* instance_id */, | 63 int /* instance_id */, |
64 int /* message_id */, | 64 int /* message_id */, |
65 gfx::Size /* repaint_view_size */) | 65 gfx::Size /* repaint_view_size */) |
66 | 66 |
67 // A BrowserPlugin sends this to the browser process when it wants to navigate | |
68 // to a given src URL. If a guest WebContents already exists, it will navigate | |
69 // that WebContents. If not, it will create the WebContents, associate it with | |
70 // the BrowserPlugin's browser-side BrowserPluginHost as a guest, and navigate | |
71 // it to the requested URL. | |
72 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_NavigateGuest, | |
73 int /* instance_id*/, | |
74 std::string /* src */, | |
75 gfx::Size /* size */) | |
76 | |
77 // When a BrowserPlugin has been removed from the embedder's DOM, it informs | |
78 // the browser process to cleanup the guest. | |
79 IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_PluginDestroyed, | |
80 int /* instance_id */) | |
81 | |
82 // ----------------------------------------------------------------------------- | |
83 // These messages are from the guest renderer to the browser process | |
84 | |
85 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_ResizeGuest_Params) | 67 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_ResizeGuest_Params) |
86 // A handle to the new buffer to use to transport damage to the | 68 // An identifier to the new buffer to use to transport damage to the embedder |
87 // embedder renderer process. | 69 // renderer process. |
88 IPC_STRUCT_MEMBER(TransportDIB::Id, damage_buffer_id) | 70 IPC_STRUCT_MEMBER(TransportDIB::Id, damage_buffer_id) |
| 71 #if defined(OS_MACOSX) |
| 72 // On OSX, a handle to the new buffer is used to map the transport dib since |
| 73 // we don't let browser manage the dib. |
| 74 IPC_STRUCT_MEMBER(TransportDIB::Handle, damage_buffer_handle) |
| 75 #endif |
89 #if defined(OS_WIN) | 76 #if defined(OS_WIN) |
90 // The size of the damage buffer because this information is not available | 77 // The size of the damage buffer because this information is not available |
91 // on Windows. | 78 // on Windows. |
92 IPC_STRUCT_MEMBER(int, damage_buffer_size) | 79 IPC_STRUCT_MEMBER(int, damage_buffer_size) |
93 #endif | 80 #endif |
94 // The new width of the plugin container. | 81 // The new width of the plugin container. |
95 IPC_STRUCT_MEMBER(int, width) | 82 IPC_STRUCT_MEMBER(int, width) |
96 // The new height of the plugin container. | 83 // The new height of the plugin container. |
97 IPC_STRUCT_MEMBER(int, height) | 84 IPC_STRUCT_MEMBER(int, height) |
98 // Indicates whether the embedder is currently waiting on a ACK from the | 85 // Indicates whether the embedder is currently waiting on a ACK from the |
99 // guest for a previous resize request. | 86 // guest for a previous resize request. |
100 IPC_STRUCT_MEMBER(bool, resize_pending) | 87 IPC_STRUCT_MEMBER(bool, resize_pending) |
101 // Indicates the scale factor of the embedder WebView. | 88 // Indicates the scale factor of the embedder WebView. |
102 IPC_STRUCT_MEMBER(float, scale_factor) | 89 IPC_STRUCT_MEMBER(float, scale_factor) |
103 IPC_STRUCT_END() | 90 IPC_STRUCT_END() |
104 | 91 |
| 92 // A BrowserPlugin sends this to BrowserPluginEmbedder (browser process) when it |
| 93 // wants to navigate to a given src URL. If a guest WebContents already exists, |
| 94 // it will navigate that WebContents. If not, it will create the WebContents, |
| 95 // associate it with the BrowserPluginGuest, and navigate it to the requested |
| 96 // URL. |
| 97 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_NavigateGuest, |
| 98 int /* instance_id*/, |
| 99 std::string /* src */, |
| 100 BrowserPluginHostMsg_ResizeGuest_Params /* resize_params */) |
| 101 |
| 102 // When a BrowserPlugin has been removed from the embedder's DOM, it informs |
| 103 // the browser process to cleanup the guest. |
| 104 IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_PluginDestroyed, |
| 105 int /* instance_id */) |
| 106 |
| 107 // ----------------------------------------------------------------------------- |
| 108 // These messages are from the guest renderer to the browser process |
| 109 |
105 // A embedder sends this message to the browser when it wants | 110 // A embedder sends this message to the browser when it wants |
106 // to resize a guest plugin container so that the guest is relaid out | 111 // to resize a guest plugin container so that the guest is relaid out |
107 // according to the new size. | 112 // according to the new size. |
108 IPC_SYNC_MESSAGE_ROUTED2_0(BrowserPluginHostMsg_ResizeGuest, | 113 IPC_SYNC_MESSAGE_ROUTED2_0(BrowserPluginHostMsg_ResizeGuest, |
109 int /* instance_id*/, | 114 int /* instance_id*/, |
110 BrowserPluginHostMsg_ResizeGuest_Params) | 115 BrowserPluginHostMsg_ResizeGuest_Params) |
111 | 116 |
112 // ----------------------------------------------------------------------------- | 117 // ----------------------------------------------------------------------------- |
113 // These messages are from the browser process to the embedder. | 118 // These messages are from the browser process to the embedder. |
114 | 119 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_ShouldAcceptTouchEvents, | 175 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_ShouldAcceptTouchEvents, |
171 int /* instance_id */, | 176 int /* instance_id */, |
172 bool /* accept */) | 177 bool /* accept */) |
173 | 178 |
174 // The guest has damage it wants to convey to the embedder so that it can | 179 // The guest has damage it wants to convey to the embedder so that it can |
175 // update its backing store. | 180 // update its backing store. |
176 IPC_MESSAGE_CONTROL3(BrowserPluginMsg_UpdateRect, | 181 IPC_MESSAGE_CONTROL3(BrowserPluginMsg_UpdateRect, |
177 int /* instance_id */, | 182 int /* instance_id */, |
178 int /* message_id */, | 183 int /* message_id */, |
179 BrowserPluginMsg_UpdateRect_Params) | 184 BrowserPluginMsg_UpdateRect_Params) |
OLD | NEW |