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

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: Created 8 years, 5 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 19
19 #define IPC_MESSAGE_START BrowserPluginMsgStart 20 #define IPC_MESSAGE_START BrowserPluginMsgStart
20 21
21 // Browser plugin messages 22 // Browser plugin messages
22 23
23 // ----------------------------------------------------------------------------- 24 // -----------------------------------------------------------------------------
24 // These messages are from the embedder to the browser process 25 // These messages are from the embedder to the browser process
25 26
27 IPC_STRUCT_TRAITS_BEGIN(BrowserPluginHostMsg_Surface_Params)
28 IPC_STRUCT_TRAITS_MEMBER(gpu_process_id)
29 IPC_STRUCT_TRAITS_MEMBER(client_id)
30 IPC_STRUCT_TRAITS_MEMBER(context_id)
31 IPC_STRUCT_TRAITS_MEMBER(texture_id[0])
32 IPC_STRUCT_TRAITS_MEMBER(texture_id[1])
33 IPC_STRUCT_TRAITS_MEMBER(sync_point)
34 IPC_STRUCT_TRAITS_END()
35
36 IPC_STRUCT_BEGIN(BrowserPlugin_SwapInfo)
37 IPC_STRUCT_MEMBER(int, route_id)
38 IPC_STRUCT_MEMBER(int, gpu_host_id)
39 IPC_STRUCT_END()
40
26 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetFocus, 41 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetFocus,
27 int /* container_instance_id */, 42 int /* container_instance_id */,
28 bool /* enable */) 43 bool /* enable */)
29 44
30 // Message payload includes: 45 // Message payload includes:
31 // 1. A blob that should be cast to WebInputEvent 46 // 1. A blob that should be cast to WebInputEvent
32 // 2. An optional boolean value indicating if a RawKeyDown event is associated 47 // 2. An optional boolean value indicating if a RawKeyDown event is associated
33 // to a keyboard shortcut of the browser. 48 // to a keyboard shortcut of the browser.
34 IPC_SYNC_MESSAGE_ROUTED0_1(BrowserPluginHostMsg_HandleInputEvent, 49 IPC_SYNC_MESSAGE_ROUTED0_1(BrowserPluginHostMsg_HandleInputEvent,
35 bool /* handled */) 50 bool /* handled */)
36 51
37 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_UpdateRect_ACK, 52 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_UpdateRect_ACK,
38 int /* container_instance_id */, 53 int /* container_instance_id */,
39 int /* message_id */) 54 int /* message_id */)
40 55
41 // A renderer sends this to the browser process when it wants to 56 // A renderer sends this to the browser process when it wants to
42 // create a browser plugin. The browser will a guest renderer process 57 // create a browser plugin. The browser will a guest renderer process
43 // if necessary. 58 // if necessary.
44 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_NavigateFromEmbedder, 59 IPC_MESSAGE_ROUTED4(BrowserPluginHostMsg_NavigateFromEmbedder,
45 int /* plugin instance id*/, 60 int /* plugin instance id*/,
46 long long /* frame id */, 61 long long /* frame id */,
47 std::string /* src */) 62 std::string /* src */,
63 BrowserPluginHostMsg_Surface_Params /* surface params */)
64
65 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_BuffersSwappedACK,
66 BrowserPlugin_SwapInfo /* info */,
67 uint32 /* sync_point */)
48 68
49 // ----------------------------------------------------------------------------- 69 // -----------------------------------------------------------------------------
50 // These messages are from the guest renderer to the browser process 70 // These messages are from the guest renderer to the browser process
51 71
52 // A embedder sends this message to the browser when it wants 72 // A embedder sends this message to the browser when it wants
53 // to resize a guest plugin container so that the guest is relaid out 73 // to resize a guest plugin container so that the guest is relaid out
54 // according to the new size. 74 // according to the new size.
55 IPC_SYNC_MESSAGE_ROUTED4_0(BrowserPluginHostMsg_ResizeGuest, 75 IPC_SYNC_MESSAGE_ROUTED4_0(BrowserPluginHostMsg_ResizeGuest,
56 int /* container_instance_id*/, 76 int /* container_instance_id*/,
57 TransportDIB::Id /* damage_buffer_id */, 77 TransportDIB::Id /* damage_buffer_id */,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 121
102 // All the above coordinates are in DIP. This is the scale factor needed 122 // All the above coordinates are in DIP. This is the scale factor needed
103 // to convert them to pixels. 123 // to convert them to pixels.
104 IPC_STRUCT_MEMBER(float, scale_factor) 124 IPC_STRUCT_MEMBER(float, scale_factor)
105 IPC_STRUCT_END() 125 IPC_STRUCT_END()
106 126
107 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_AdvanceFocus, 127 IPC_MESSAGE_CONTROL2(BrowserPluginMsg_AdvanceFocus,
108 int /* instance_id */, 128 int /* instance_id */,
109 bool /* reverse */) 129 bool /* reverse */)
110 130
131 IPC_MESSAGE_CONTROL3(BrowserPluginMsg_BuffersSwapped,
132 int /* instance_id */,
133 uint64 /* surface_handle */,
134 BrowserPlugin_SwapInfo /* info */)
135
111 IPC_MESSAGE_CONTROL3(BrowserPluginMsg_UpdateRect, 136 IPC_MESSAGE_CONTROL3(BrowserPluginMsg_UpdateRect,
112 int /* instance_id */, 137 int /* instance_id */,
113 int /* message_id */, 138 int /* message_id */,
114 BrowserPluginMsg_UpdateRect_Params) 139 BrowserPluginMsg_UpdateRect_Params)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698