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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin_manager_impl.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: Add todo for auto deny when no listeners attached. Created 8 years 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 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h" 5 #include "content/renderer/browser_plugin/browser_plugin_manager_impl.h"
6 6
7 #include "content/common/browser_plugin_messages.h" 7 #include "content/common/browser_plugin_messages.h"
8 #include "content/renderer/browser_plugin/browser_plugin.h" 8 #include "content/renderer/browser_plugin/browser_plugin.h"
9 #include "content/renderer/render_thread_impl.h" 9 #include "content/renderer/render_thread_impl.h"
10 #include "ui/gfx/point.h" 10 #include "ui/gfx/point.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents, 46 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents,
47 OnShouldAcceptTouchEvents) 47 OnShouldAcceptTouchEvents)
48 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart) 48 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart)
49 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort) 49 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort)
50 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadRedirect, OnLoadRedirect) 50 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadRedirect, OnLoadRedirect)
51 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadCommit, OnLoadCommit) 51 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadCommit, OnLoadCommit)
52 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStop, OnLoadStop) 52 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStop, OnLoadStop)
53 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetCursor, OnSetCursor) 53 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetCursor, OnSetCursor)
54 IPC_MESSAGE_HANDLER(BrowserPluginMsg_PluginAtPositionRequest, 54 IPC_MESSAGE_HANDLER(BrowserPluginMsg_PluginAtPositionRequest,
55 OnPluginAtPositionRequest); 55 OnPluginAtPositionRequest);
56 IPC_MESSAGE_HANDLER(BrowserPluginMsg_RequestMediaAccess,
57 OnRequestMediaAccess)
56 IPC_MESSAGE_UNHANDLED(handled = false) 58 IPC_MESSAGE_UNHANDLED(handled = false)
57 IPC_END_MESSAGE_MAP() 59 IPC_END_MESSAGE_MAP()
58 return handled; 60 return handled;
59 } 61 }
60 62
61 void BrowserPluginManagerImpl::OnPluginAtPositionRequest( 63 void BrowserPluginManagerImpl::OnPluginAtPositionRequest(
62 const IPC::Message& message, 64 const IPC::Message& message,
63 int request_id, 65 int request_id,
64 const gfx::Point& position) { 66 const gfx::Point& position) {
65 int instance_id = -1; 67 int instance_id = -1;
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 plugin->LoadRedirect(old_url, new_url, is_top_level); 165 plugin->LoadRedirect(old_url, new_url, is_top_level);
164 } 166 }
165 167
166 void BrowserPluginManagerImpl::OnSetCursor(int instance_id, 168 void BrowserPluginManagerImpl::OnSetCursor(int instance_id,
167 const WebCursor& cursor) { 169 const WebCursor& cursor) {
168 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); 170 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
169 if (plugin) 171 if (plugin)
170 plugin->SetCursor(cursor); 172 plugin->SetCursor(cursor);
171 } 173 }
172 174
175 void BrowserPluginManagerImpl::OnRequestMediaAccess(int instance_id,
176 int request_id) {
177 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
178 if (plugin)
179 plugin->RequestMediaAccess(request_id);
180 }
181
173 } // namespace content 182 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698