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

Unified 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: Fix header guard name. 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 side-by-side diff with in-line comments
Download patch
Index: content/common/browser_plugin_messages.h
diff --git a/content/common/browser_plugin_messages.h b/content/common/browser_plugin_messages.h
index bd9c98787106d5679c8f3e80d4c356dbc5c93e2a..191401a4d85dfc4aa38669fd68e7f293224f2fe8 100644
--- a/content/common/browser_plugin_messages.h
+++ b/content/common/browser_plugin_messages.h
@@ -9,6 +9,8 @@
#include "base/basictypes.h"
#include "base/process.h"
#include "base/shared_memory.h"
+#include "base/values.h"
+#include "content/common/browser_plugin_message_enums.h"
#include "content/common/content_export.h"
#include "content/common/content_param_traits.h"
#include "content/public/common/common_param_traits.h"
@@ -28,6 +30,8 @@
#define IPC_MESSAGE_START BrowserPluginMsgStart
+
+IPC_ENUM_TRAITS(BrowserPluginPermissionType)
IPC_ENUM_TRAITS(WebKit::WebDragStatus)
IPC_STRUCT_BEGIN(BrowserPluginHostMsg_AutoSize_Params)
@@ -236,6 +240,18 @@ IPC_MESSAGE_ROUTED2(BrowserPluginHostMsg_SetName,
int /* instance_id */,
std::string /* name */)
+// Tells the guest that its request for an API permission has been allowed or
+// denied.
+// Note that |allow| = true does not readily mean that the guest will be granted
+// permission, since a security check in the embedder might follow. For example
+// for media access permission, the guest will be granted permission only if its
+// embedder also has access.
+IPC_MESSAGE_ROUTED4(BrowserPluginHostMsg_AllowPermission,
+ int /* instance_id */,
+ BrowserPluginPermissionType /* permission_type */,
+ int /* request_id */,
+ bool /* allow */)
+
// -----------------------------------------------------------------------------
// These messages are from the guest renderer to the browser process
@@ -363,3 +379,11 @@ IPC_MESSAGE_ROUTED5(BrowserPluginMsg_BuffersSwapped,
std::string /* mailbox_name */,
int /* route_id */,
int /* gpu_host_id */)
+
+// When the guest requests permission, the browser process forwards this
+// request to the embeddder through this message.
+IPC_MESSAGE_ROUTED4(BrowserPluginMsg_RequestPermission,
+ int /* instance_id */,
+ BrowserPluginPermissionType /* permission_type */,
+ int /* request_id */,
+ DictionaryValue /* request_info */)

Powered by Google App Engine
This is Rietveld 408576698