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

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

Issue 11093080: <webview>: First stab at implementing media permission request for guests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments from cdn@, use enums for permission_type. Created 7 years, 10 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 | Annotate | Revision Log
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 "base/shared_memory.h" 11 #include "base/shared_memory.h"
12 #include "base/values.h"
12 #include "content/common/content_export.h" 13 #include "content/common/content_export.h"
13 #include "content/common/content_param_traits.h" 14 #include "content/common/content_param_traits.h"
14 #include "content/public/common/common_param_traits.h" 15 #include "content/public/common/common_param_traits.h"
15 #include "ipc/ipc_channel_handle.h" 16 #include "ipc/ipc_channel_handle.h"
16 #include "ipc/ipc_message_macros.h" 17 #include "ipc/ipc_message_macros.h"
17 #include "ipc/ipc_message_utils.h" 18 #include "ipc/ipc_message_utils.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h" 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDragStatus.h"
20 #include "ui/gfx/point.h" 21 #include "ui/gfx/point.h"
21 #include "ui/gfx/rect.h" 22 #include "ui/gfx/rect.h"
22 #include "ui/gfx/size.h" 23 #include "ui/gfx/size.h"
23 #include "webkit/glue/webcursor.h" 24 #include "webkit/glue/webcursor.h"
24 #include "webkit/glue/webdropdata.h" 25 #include "webkit/glue/webdropdata.h"
25 26
26 #undef IPC_MESSAGE_EXPORT 27 #undef IPC_MESSAGE_EXPORT
27 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 28 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
28 29
29 #define IPC_MESSAGE_START BrowserPluginMsgStart 30 #define IPC_MESSAGE_START BrowserPluginMsgStart
30 31
32 #ifndef CONTENT_COMMON_BROWSER_PLUGIN_MESSAGES_H_
33 #define CONTENT_COMMON_BROWSER_PLUGIN_MESSAGES_H_
34
35 enum BrowserPluginPermissionType {
Fady Samuel 2013/02/19 21:44:33 This seems messy. Could we move this to another fi
lazyboy 2013/02/19 22:08:47 Done.
36 // Unknown type of permission request.
37 BrowserPluginPermissionTypeUnknown,
38
39 // Media access (audio/video) permission request type.
40 BrowserPluginPermissionTypeMedia,
41 };
42
43 #endif // CONTENT_COMMON_BROWSER_PLUGIN_MESSAGES_H_
44
45 IPC_ENUM_TRAITS(BrowserPluginPermissionType)
31 IPC_ENUM_TRAITS(WebKit::WebDragStatus) 46 IPC_ENUM_TRAITS(WebKit::WebDragStatus)
32 47
33 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_AutoSize_Params) 48 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_AutoSize_Params)
34 IPC_STRUCT_MEMBER(bool, enable) 49 IPC_STRUCT_MEMBER(bool, enable)
35 IPC_STRUCT_MEMBER(gfx::Size, max_size) 50 IPC_STRUCT_MEMBER(gfx::Size, max_size)
36 IPC_STRUCT_MEMBER(gfx::Size, min_size) 51 IPC_STRUCT_MEMBER(gfx::Size, min_size)
37 IPC_STRUCT_END() 52 IPC_STRUCT_END()
38 53
39 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_ResizeGuest_Params) 54 IPC_STRUCT_BEGIN(BrowserPluginHostMsg_ResizeGuest_Params)
40 // The sequence number used to uniquely identify the damage buffer for the 55 // The sequence number used to uniquely identify the damage buffer for the
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_PluginAtPositionResponse, 244 IPC_MESSAGE_ROUTED3(BrowserPluginHostMsg_PluginAtPositionResponse,
230 int /* instance_id */, 245 int /* instance_id */,
231 int /* request_id */, 246 int /* request_id */,
232 gfx::Point /* position */) 247 gfx::Point /* position */)
233 248
234 // Sets the name of the guest window to the provided |name|. 249 // Sets the name of the guest window to the provided |name|.
235 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetName, 250 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetName,
236 int /* instance_id */, 251 int /* instance_id */,
237 std::string /* name */) 252 std::string /* name */)
238 253
254 // Tells the guest that its request for an API permission has been allowed or
255 // denied.
256 // Note that |allow| = true does not readily mean that the guest will be granted
257 // permission, since a security check in the embedder might follow. For example
258 // for media access permission, the guest will be granted permission only if its
259 // embedder also has access.
260 IPC_MESSAGE_ROUTED4(BrowserPluginHostMsg_AllowPermission,
261 int /* instance_id */,
262 BrowserPluginPermissionType /* permission_type */,
263 int /* request_id */,
264 bool /* allow */)
265
239 // ----------------------------------------------------------------------------- 266 // -----------------------------------------------------------------------------
240 // These messages are from the guest renderer to the browser process 267 // These messages are from the guest renderer to the browser process
241 268
242 // A embedder sends this message to the browser when it wants 269 // A embedder sends this message to the browser when it wants
243 // to resize a guest plugin container so that the guest is relaid out 270 // to resize a guest plugin container so that the guest is relaid out
244 // according to the new size. 271 // according to the new size.
245 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ResizeGuest, 272 IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_ResizeGuest,
246 int /* instance_id*/, 273 int /* instance_id*/,
247 BrowserPluginHostMsg_ResizeGuest_Params) 274 BrowserPluginHostMsg_ResizeGuest_Params)
248 275
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 // Guest renders into an FBO with textures provided by the embedder. 383 // Guest renders into an FBO with textures provided by the embedder.
357 // When HW accelerated buffers are swapped in the guest, the message 384 // When HW accelerated buffers are swapped in the guest, the message
358 // is forwarded to the embedder to notify it of a new texture 385 // is forwarded to the embedder to notify it of a new texture
359 // available for compositing. 386 // available for compositing.
360 IPC_MESSAGE_ROUTED5(BrowserPluginMsg_BuffersSwapped, 387 IPC_MESSAGE_ROUTED5(BrowserPluginMsg_BuffersSwapped,
361 int /* instance_id */, 388 int /* instance_id */,
362 gfx::Size /* size */, 389 gfx::Size /* size */,
363 std::string /* mailbox_name */, 390 std::string /* mailbox_name */,
364 int /* route_id */, 391 int /* route_id */,
365 int /* gpu_host_id */) 392 int /* gpu_host_id */)
393
394 // When the guest requests permission, the browser process forwards this
395 // request to the embeddder through this message.
396 IPC_MESSAGE_ROUTED4(BrowserPluginMsg_RequestPermission,
397 int /* instance_id */,
398 BrowserPluginPermissionType /* permission_type */,
399 int /* request_id */,
400 DictionaryValue /* request_info */)
OLDNEW
« no previous file with comments | « content/browser/browser_plugin/browser_plugin_guest.cc ('k') | content/renderer/browser_plugin/browser_plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698