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

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: 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 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..5c51d12c8ccc2a8ab097ef1533b9414dd27f1fb6 100644
--- a/content/common/browser_plugin_messages.h
+++ b/content/common/browser_plugin_messages.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/process.h"
#include "base/shared_memory.h"
+#include "base/values.h"
#include "content/common/content_export.h"
#include "content/common/content_param_traits.h"
#include "content/public/common/common_param_traits.h"
@@ -28,6 +29,20 @@
#define IPC_MESSAGE_START BrowserPluginMsgStart
+#ifndef CONTENT_COMMON_BROWSER_PLUGIN_MESSAGES_H_
+#define CONTENT_COMMON_BROWSER_PLUGIN_MESSAGES_H_
+
+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.
+ // Unknown type of permission request.
+ BrowserPluginPermissionTypeUnknown,
+
+ // Media access (audio/video) permission request type.
+ BrowserPluginPermissionTypeMedia,
+};
+
+#endif // CONTENT_COMMON_BROWSER_PLUGIN_MESSAGES_H_
+
+IPC_ENUM_TRAITS(BrowserPluginPermissionType)
IPC_ENUM_TRAITS(WebKit::WebDragStatus)
IPC_STRUCT_BEGIN(BrowserPluginHostMsg_AutoSize_Params)
@@ -236,6 +251,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 +390,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 */)
« 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