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

Side by Side Diff: content/renderer/pepper/host_dispatcher_wrapper.cc

Issue 48743008: Pepper: specify the security origin when enumerating media devices. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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/pepper/host_dispatcher_wrapper.h" 5 #include "content/renderer/pepper/host_dispatcher_wrapper.h"
6 6
7 #include "content/common/view_messages.h" 7 #include "content/common/view_messages.h"
8 #include "content/renderer/pepper/pepper_hung_plugin_filter.h" 8 #include "content/renderer/pepper/pepper_hung_plugin_filter.h"
9 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 9 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
10 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h" 10 #include "content/renderer/pepper/pepper_proxy_channel_delegate_impl.h"
11 #include "content/renderer/pepper/plugin_module.h" 11 #include "content/renderer/pepper/plugin_module.h"
12 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" 12 #include "content/renderer/pepper/renderer_ppapi_host_impl.h"
13 #include "content/renderer/pepper/renderer_restrict_dispatch_group.h" 13 #include "content/renderer/pepper/renderer_restrict_dispatch_group.h"
14 #include "content/renderer/render_view_impl.h" 14 #include "content/renderer/render_view_impl.h"
15 #include "third_party/WebKit/public/web/WebDocument.h"
16 #include "third_party/WebKit/public/web/WebElement.h"
17 #include "third_party/WebKit/public/web/WebPluginContainer.h"
18 15
19 namespace content { 16 namespace content {
20 17
21 HostDispatcherWrapper::HostDispatcherWrapper( 18 HostDispatcherWrapper::HostDispatcherWrapper(
22 PluginModule* module, 19 PluginModule* module,
23 base::ProcessId peer_pid, 20 base::ProcessId peer_pid,
24 int plugin_child_id, 21 int plugin_child_id,
25 const ppapi::PpapiPermissions& perms, 22 const ppapi::PpapiPermissions& perms,
26 bool is_external) 23 bool is_external)
27 : module_(module), 24 : module_(module),
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // isn't true for browser tag support. 77 // isn't true for browser tag support.
81 if (host) { 78 if (host) {
82 RenderView* render_view = host->GetRenderViewForInstance(instance); 79 RenderView* render_view = host->GetRenderViewForInstance(instance);
83 PepperPluginInstance* plugin_instance = host->GetPluginInstance(instance); 80 PepperPluginInstance* plugin_instance = host->GetPluginInstance(instance);
84 render_view->Send(new ViewHostMsg_DidCreateOutOfProcessPepperInstance( 81 render_view->Send(new ViewHostMsg_DidCreateOutOfProcessPepperInstance(
85 plugin_child_id_, 82 plugin_child_id_,
86 instance, 83 instance,
87 PepperRendererInstanceData( 84 PepperRendererInstanceData(
88 0, // The render process id will be supplied in the browser. 85 0, // The render process id will be supplied in the browser.
89 render_view->GetRoutingID(), 86 render_view->GetRoutingID(),
90 plugin_instance->GetContainer()->element().document().url(), 87 host->GetDocumentURL(instance),
91 plugin_instance->GetPluginURL()), 88 plugin_instance->GetPluginURL()),
92 is_external_)); 89 is_external_));
93 } 90 }
94 } 91 }
95 92
96 void HostDispatcherWrapper::RemoveInstance(PP_Instance instance) { 93 void HostDispatcherWrapper::RemoveInstance(PP_Instance instance) {
97 ppapi::proxy::HostDispatcher::RemoveForInstance(instance); 94 ppapi::proxy::HostDispatcher::RemoveForInstance(instance);
98 95
99 RendererPpapiHostImpl* host = 96 RendererPpapiHostImpl* host =
100 RendererPpapiHostImpl::GetForPPInstance(instance); 97 RendererPpapiHostImpl::GetForPPInstance(instance);
101 // TODO(brettw) remove null check as described in AddInstance. 98 // TODO(brettw) remove null check as described in AddInstance.
102 if (host) { 99 if (host) {
103 RenderView* render_view = host->GetRenderViewForInstance(instance); 100 RenderView* render_view = host->GetRenderViewForInstance(instance);
104 render_view->Send(new ViewHostMsg_DidDeleteOutOfProcessPepperInstance( 101 render_view->Send(new ViewHostMsg_DidDeleteOutOfProcessPepperInstance(
105 plugin_child_id_, 102 plugin_child_id_,
106 instance, 103 instance,
107 is_external_)); 104 is_external_));
108 } 105 }
109 } 106 }
110 107
111 } // namespace content 108 } // namespace content
OLDNEW
« no previous file with comments | « content/public/renderer/renderer_ppapi_host.h ('k') | content/renderer/pepper/mock_renderer_ppapi_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698