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

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

Issue 10214007: Add an IPC channel between the NaCl loader process and the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 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/pepper_plugin_delegate_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 channel_handle, 260 channel_handle,
261 module->pp_module(), 261 module->pp_module(),
262 webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(), 262 webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(),
263 GetPreferences(), 263 GetPreferences(),
264 hung_filter.get())) 264 hung_filter.get()))
265 return scoped_refptr<webkit::ppapi::PluginModule>(); 265 return scoped_refptr<webkit::ppapi::PluginModule>();
266 module->InitAsProxied(dispatcher.release()); 266 module->InitAsProxied(dispatcher.release());
267 return module; 267 return module;
268 } 268 }
269 269
270 void PepperPluginDelegateImpl::CreatePepperHostDispatcher(
271 const FilePath& plugin_path,
272 int plugin_child_id,
273 base::ProcessHandle plugin_process_handle,
274 const IPC::ChannelHandle& channel_handle) {
275 webkit::ppapi::PluginModule* module =
276 PepperPluginRegistry::GetInstance()->GetLiveModule(plugin_path);
277 scoped_refptr<PepperHungPluginFilter> hung_filter(
278 new PepperHungPluginFilter(plugin_path, render_view_->routing_id(),
279 plugin_child_id));
280 scoped_ptr<HostDispatcherWrapper> dispatcher(new HostDispatcherWrapper);
281 if (dispatcher->Init(
282 plugin_process_handle,
283 channel_handle.name,
284 module->pp_module(),
285 webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(),
286 GetPreferences(),
287 hung_filter.get())) {
288 module->InitAsProxied(dispatcher.release());
289 }
290 }
291
270 scoped_refptr<PepperBrokerImpl> PepperPluginDelegateImpl::CreateBroker( 292 scoped_refptr<PepperBrokerImpl> PepperPluginDelegateImpl::CreateBroker(
271 webkit::ppapi::PluginModule* plugin_module) { 293 webkit::ppapi::PluginModule* plugin_module) {
272 DCHECK(plugin_module); 294 DCHECK(plugin_module);
273 DCHECK(!plugin_module->GetBroker()); 295 DCHECK(!plugin_module->GetBroker());
274 296
275 // The broker path is the same as the plugin. 297 // The broker path is the same as the plugin.
276 const FilePath& broker_path = plugin_module->path(); 298 const FilePath& broker_path = plugin_module->path();
277 299
278 scoped_refptr<PepperBrokerImpl> broker = 300 scoped_refptr<PepperBrokerImpl> broker =
279 new PepperBrokerImpl(plugin_module, this); 301 new PepperBrokerImpl(plugin_module, this);
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1622 mouse_lock_instances_.erase(it); 1644 mouse_lock_instances_.erase(it);
1623 } 1645 }
1624 } 1646 }
1625 1647
1626 webkit_glue::ClipboardClient* 1648 webkit_glue::ClipboardClient*
1627 PepperPluginDelegateImpl::CreateClipboardClient() const { 1649 PepperPluginDelegateImpl::CreateClipboardClient() const {
1628 return new RendererClipboardClient; 1650 return new RendererClipboardClient;
1629 } 1651 }
1630 1652
1631 } // namespace content 1653 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698