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

Unified Diff: content/browser/browser_plugin/browser_plugin_embedder.cc

Issue 11093080: <webview>: First stab at implementing media permission request for guests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implement first allow/deny wins, still requires preventDefault impl + now tests pass. Created 7 years, 11 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/browser/browser_plugin/browser_plugin_embedder.cc
diff --git a/content/browser/browser_plugin/browser_plugin_embedder.cc b/content/browser/browser_plugin/browser_plugin_embedder.cc
index 4ffaa3d7b383bdb45bb84d562e2a17ae8b070f4e..0c306499bd0011b9f61e9ee9cbb80c25e765f411 100644
--- a/content/browser/browser_plugin/browser_plugin_embedder.cc
+++ b/content/browser/browser_plugin/browser_plugin_embedder.cc
@@ -250,6 +250,8 @@ bool BrowserPluginEmbedder::OnMessageReceived(const IPC::Message& message) {
OnPluginDestroyed)
IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_BuffersSwappedACK,
OnSwapBuffersACK)
+ IPC_MESSAGE_HANDLER(BrowserPluginHostMsg_AllowMediaAccess,
+ OnAllowMediaAccess)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -359,6 +361,14 @@ void BrowserPluginEmbedder::OnPluginDestroyed(int instance_id) {
DestroyGuestByInstanceID(instance_id);
}
+void BrowserPluginEmbedder::OnAllowMediaAccess(int instance_id,
+ int request_id,
+ bool should_allow) {
+ BrowserPluginGuest* guest = GetGuestByInstanceID(instance_id);
Fady Samuel 2013/02/05 17:53:27 No need for this. Simply add BrowserPluginHostMsg_
lazyboy 2013/02/07 04:38:42 Yep, we also have embedder_web_contents_ directly
+ if (guest)
+ guest->AllowMediaAccess(web_contents(), request_id, should_allow);
+}
+
void BrowserPluginEmbedder::OnSwapBuffersACK(int route_id,
int gpu_host_id,
const std::string& mailbox_name,

Powered by Google App Engine
This is Rietveld 408576698