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

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: Reup patch, with new style event handling + fix tests. Created 8 years, 1 month 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents, 45 IPC_MESSAGE_HANDLER(BrowserPluginMsg_ShouldAcceptTouchEvents,
46 OnShouldAcceptTouchEvents) 46 OnShouldAcceptTouchEvents)
47 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart) 47 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStart, OnLoadStart)
48 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort) 48 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadAbort, OnLoadAbort)
49 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadRedirect, OnLoadRedirect) 49 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadRedirect, OnLoadRedirect)
50 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadCommit, OnLoadCommit) 50 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadCommit, OnLoadCommit)
51 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStop, OnLoadStop) 51 IPC_MESSAGE_HANDLER(BrowserPluginMsg_LoadStop, OnLoadStop)
52 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetCursor, OnSetCursor) 52 IPC_MESSAGE_HANDLER(BrowserPluginMsg_SetCursor, OnSetCursor)
53 IPC_MESSAGE_HANDLER(BrowserPluginMsg_PluginAtPositionRequest, 53 IPC_MESSAGE_HANDLER(BrowserPluginMsg_PluginAtPositionRequest,
54 OnPluginAtPositionRequest); 54 OnPluginAtPositionRequest);
55 IPC_MESSAGE_HANDLER(BrowserPluginMsg_RequestMediaAccess,
56 OnRequestMediaAccess)
55 IPC_MESSAGE_UNHANDLED(handled = false) 57 IPC_MESSAGE_UNHANDLED(handled = false)
56 IPC_END_MESSAGE_MAP() 58 IPC_END_MESSAGE_MAP()
57 return handled; 59 return handled;
58 } 60 }
59 61
60 void BrowserPluginManagerImpl::OnPluginAtPositionRequest( 62 void BrowserPluginManagerImpl::OnPluginAtPositionRequest(
61 int source_routing_id, int request_id, const gfx::Point& position) { 63 int source_routing_id, int request_id, const gfx::Point& position) {
62 int instance_id = -1; 64 int instance_id = -1;
63 IDMap<BrowserPlugin>::iterator it(&instances_); 65 IDMap<BrowserPlugin>::iterator it(&instances_);
64 gfx::Point local_position = position; 66 gfx::Point local_position = position;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 plugin->LoadRedirect(old_url, new_url, is_top_level); 161 plugin->LoadRedirect(old_url, new_url, is_top_level);
160 } 162 }
161 163
162 void BrowserPluginManagerImpl::OnSetCursor(int instance_id, 164 void BrowserPluginManagerImpl::OnSetCursor(int instance_id,
163 const WebCursor& cursor) { 165 const WebCursor& cursor) {
164 BrowserPlugin* plugin = GetBrowserPlugin(instance_id); 166 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
165 if (plugin) 167 if (plugin)
166 plugin->SetCursor(cursor); 168 plugin->SetCursor(cursor);
167 } 169 }
168 170
171 void BrowserPluginManagerImpl::OnRequestMediaAccess(int instance_id,
172 int request_id) {
173 BrowserPlugin* plugin = GetBrowserPlugin(instance_id);
174 if (plugin)
175 plugin->RequestMediaAccess(request_id);
176 }
177
169 } // namespace content 178 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698