Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Side by Side Diff: content/common/browser_plugin_messages.h

Issue 10735010: 3D Compositing in <browser>, first draft. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Use the correct baseline Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "content/common/browser_plugin_info.h"
11 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
12 #include "content/public/common/common_param_traits.h" 13 #include "content/public/common/common_param_traits.h"
13 #include "ipc/ipc_channel_handle.h" 14 #include "ipc/ipc_channel_handle.h"
14 #include "ipc/ipc_message_macros.h" 15 #include "ipc/ipc_message_macros.h"
15 #include "ipc/ipc_message_utils.h" 16 #include "ipc/ipc_message_utils.h"
16 #include "ui/gfx/rect.h" 17 #include "ui/gfx/rect.h"
17 #include "ui/gfx/size.h" 18 #include "ui/gfx/size.h"
18 #include "webkit/glue/webcursor.h" 19 #include "webkit/glue/webcursor.h"
19 20
20 #undef IPC_MESSAGE_EXPORT 21 #undef IPC_MESSAGE_EXPORT
21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 22 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
22 23
23 #define IPC_MESSAGE_START BrowserPluginMsgStart 24 #define IPC_MESSAGE_START BrowserPluginMsgStart
24 25
25 // Browser plugin messages 26 // Browser plugin messages
26 27
27 // ----------------------------------------------------------------------------- 28 // -----------------------------------------------------------------------------
28 // These messages are from the embedder to the browser process. 29 // These messages are from the embedder to the browser process.
29 30
31 IPC_STRUCT_TRAITS_BEGIN(BrowserPluginHostMsg_Surface_Params)
32 IPC_STRUCT_TRAITS_MEMBER(gpu_process_id)
33 IPC_STRUCT_TRAITS_MEMBER(client_id)
34 IPC_STRUCT_TRAITS_MEMBER(context_id)
35 IPC_STRUCT_TRAITS_MEMBER(texture_id[0])
36 IPC_STRUCT_TRAITS_MEMBER(texture_id[1])
37 IPC_STRUCT_TRAITS_MEMBER(sync_point)
38 IPC_STRUCT_TRAITS_END()
39
40 IPC_STRUCT_TRAITS_BEGIN(BrowserPlugin_SwapInfo)
41 IPC_STRUCT_TRAITS_MEMBER(route_id)
42 IPC_STRUCT_TRAITS_MEMBER(gpu_host_id)
43 IPC_STRUCT_TRAITS_END()
44
30 // Tells the guest to focus or defocus itself. 45 // Tells the guest to focus or defocus itself.
31 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetFocus, 46 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetFocus,
32 int /* instance_id */, 47 int /* instance_id */,
33 bool /* enable */) 48 bool /* enable */)
34 49
35 // Message payload includes: 50 // Message payload includes:
36 // 1. A blob that should be cast to WebInputEvent 51 // 1. A blob that should be cast to WebInputEvent
37 // 2. An optional boolean value indicating if a RawKeyDown event is associated 52 // 2. An optional boolean value indicating if a RawKeyDown event is associated
38 // to a keyboard shortcut of the browser. 53 // to a keyboard shortcut of the browser.
39 IPC_SYNC_MESSAGE_ROUTED0_2(BrowserPluginHostMsg_HandleInputEvent, 54 IPC_SYNC_MESSAGE_ROUTED0_2(BrowserPluginHostMsg_HandleInputEvent,
40 bool /* handled */, 55 bool /* handled */,
41 WebCursor /* cursor */) 56 WebCursor /* cursor */)
42 57
43 // 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
44 // 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
45 // 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
46 // container, the BrowserPlugin requests a new size as well. 61 // container, the BrowserPlugin requests a new size as well.
47 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_UpdateRect_ACK, 62 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_UpdateRect_ACK,
48 int /* instance_id */, 63 int /* instance_id */,
49 int /* message_id */, 64 int /* message_id */,
50 gfx::Size /* repaint_view_size */) 65 gfx::Size /* repaint_view_size */)
51 66
52 // A BrowserPlugin sends this to the browser process when it wants to navigate 67 // A BrowserPlugin sends this to the browser process when it wants to navigate
53 // to a given src URL. If a guest WebContents already exists, it will navigate 68 // to a given src URL. If a guest WebContents already exists, it will navigate
54 // that WebContents. If not, it will create the WebContents, associate it with 69 // that WebContents. If not, it will create the WebContents, associate it with
55 // the BrowserPlugin's browser-side BrowserPluginHost as a guest, and navigate 70 // the BrowserPlugin's browser-side BrowserPluginHost as a guest, and navigate
56 // it to the requested URL. 71 // it to the requested URL.
57 IPC_MESSAGE_ROUTED4(BrowserPluginHostMsg_NavigateGuest, 72 IPC_MESSAGE_ROUTED5(BrowserPluginHostMsg_NavigateGuest,
58 int /* instance_id*/, 73 int /* instance_id*/,
59 int64 /* frame_id */, 74 int64 /* frame_id */,
60 std::string /* src */, 75 std::string /* src */,
61 gfx::Size /* size */) 76 gfx::Size /* size */,
77 BrowserPluginHostMsg_Surface_Params /* surface params */)
78
79 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_BuffersSwappedACK,
80 BrowserPlugin_SwapInfo /* info */,
81 uint32 /* sync_point */)
62 82
63 // When a BrowserPlugin has been removed from the embedder's DOM, it informs 83 // When a BrowserPlugin has been removed from the embedder's DOM, it informs
64 // the browser process to cleanup the guest. 84 // the browser process to cleanup the guest.
65 IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_PluginDestroyed, 85 IPC_MESSAGE_ROUTED1(BrowserPluginHostMsg_PluginDestroyed,
66 int /* instance_id */) 86 int /* instance_id */)
67 87
68 // ----------------------------------------------------------------------------- 88 // -----------------------------------------------------------------------------
69 // These messages are from the guest renderer to the browser process 89 // These messages are from the guest renderer to the browser process
70 90
71 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_ResizeGuest_Params) 91 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_ResizeGuest_Params)
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // progress. If auto-resize is enabled, this should update the corresponding 150 // progress. If auto-resize is enabled, this should update the corresponding
131 // view size. 151 // view size.
132 IPC_STRUCT_MEMBER(gfx::Size, view_size) 152 IPC_STRUCT_MEMBER(gfx::Size, view_size)
133 153
134 // All the above coordinates are in DIP. This is the scale factor needed 154 // All the above coordinates are in DIP. This is the scale factor needed
135 // to convert them to pixels. 155 // to convert them to pixels.
136 IPC_STRUCT_MEMBER(float, scale_factor) 156 IPC_STRUCT_MEMBER(float, scale_factor)
137 157
138 // Is this UpdateRect an ACK to a resize request? 158 // Is this UpdateRect an ACK to a resize request?
139 IPC_STRUCT_MEMBER(bool, is_resize_ack) 159 IPC_STRUCT_MEMBER(bool, is_resize_ack)
160
161 // Do we need to reply to it
162 IPC_STRUCT_MEMBER(bool, needs_ack)
140 IPC_STRUCT_END() 163 IPC_STRUCT_END()
141 164
142 // When the user tabs to the end of the tab stops of a guest, the browser 165 // When the user tabs to the end of the tab stops of a guest, the browser
143 // process informs the embedder to tab out of the browser plugin. 166 // process informs the embedder to tab out of the browser plugin.
144 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_AdvanceFocus, 167 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_AdvanceFocus,
145 int /* instance_id */, 168 int /* instance_id */,
146 bool /* reverse */) 169 bool /* reverse */)
147 170
171 IPC_MESSAGE_CONTROL3(BrowserPluginMsg_BuffersSwapped,
172 int /* instance_id */,
173 uint64 /* surface_handle */,
174 BrowserPlugin_SwapInfo /* info */)
175
176 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_SurfaceResize,
177 int /* instance_id */,
178 gfx::Size /* size */)
179
148 // The guest has damage it wants to convey to the embedder so that it can 180 // The guest has damage it wants to convey to the embedder so that it can
149 // update its backing store. 181 // update its backing store.
150 IPC_MESSAGE_CONTROL3(BrowserPluginMsg_UpdateRect, 182 IPC_MESSAGE_CONTROL3(BrowserPluginMsg_UpdateRect,
151 int /* instance_id */, 183 int /* instance_id */,
152 int /* message_id */, 184 int /* message_id */,
153 BrowserPluginMsg_UpdateRect_Params) 185 BrowserPluginMsg_UpdateRect_Params)
OLDNEW
« no previous file with comments | « content/common/browser_plugin_info.h ('k') | content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698