OLD | NEW |
---|---|
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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
407 | 407 |
408 RendererPpapiHostImpl* host_impl = | 408 RendererPpapiHostImpl* host_impl = |
409 content::RendererPpapiHostImpl::CreateOnModuleForOutOfProcess( | 409 content::RendererPpapiHostImpl::CreateOnModuleForOutOfProcess( |
410 module, dispatcher->dispatcher(), permissions); | 410 module, dispatcher->dispatcher(), permissions); |
411 render_view_->PpapiPluginCreated(host_impl); | 411 render_view_->PpapiPluginCreated(host_impl); |
412 | 412 |
413 module->InitAsProxied(dispatcher.release()); | 413 module->InitAsProxied(dispatcher.release()); |
414 return module; | 414 return module; |
415 } | 415 } |
416 | 416 |
417 RendererPpapiHost* PepperPluginDelegateImpl::CreateExternalPluginModule( | |
418 scoped_refptr<webkit::ppapi::PluginModule> plugin_module, | |
419 const FilePath& file_path, | |
420 ppapi::PpapiPermissions permissions, | |
421 const IPC::ChannelHandle& channel_handle, | |
422 int child_process_id) { | |
423 scoped_refptr<PepperHungPluginFilter> hung_filter( | |
brettw
2012/10/16 23:37:32
This code is just copied and pasted from the previ
bbudge
2012/10/17 00:18:44
Done. Good eye.
| |
424 new PepperHungPluginFilter(file_path, | |
425 render_view_->routing_id(), | |
426 child_process_id)); | |
427 // Create a new HostDispatcher for the proxy, and hook it up to the | |
428 // plugin module. | |
429 scoped_ptr<HostDispatcherWrapper> dispatcher( | |
430 new HostDispatcherWrapper(plugin_module, | |
431 child_process_id, | |
432 permissions)); | |
433 if (!dispatcher->Init( | |
434 channel_handle, | |
435 webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(), | |
436 GetPreferences(), | |
437 permissions, | |
438 hung_filter.get())) | |
439 return NULL; | |
440 | |
441 RendererPpapiHostImpl* host_impl = | |
442 content::RendererPpapiHostImpl::CreateOnModuleForOutOfProcess( | |
jam
2012/10/16 21:14:43
nit: no need for content::
bbudge
2012/10/17 00:18:44
Done.
| |
443 plugin_module, dispatcher->dispatcher(), permissions); | |
444 render_view_->PpapiPluginCreated(host_impl); | |
445 | |
446 plugin_module->InitAsProxied(dispatcher.release()); | |
447 | |
448 return host_impl; | |
449 } | |
450 | |
417 scoped_refptr<webkit::ppapi::PluginModule> | 451 scoped_refptr<webkit::ppapi::PluginModule> |
418 PepperPluginDelegateImpl::CreateBrowserPluginModule( | 452 PepperPluginDelegateImpl::CreateBrowserPluginModule( |
419 const IPC::ChannelHandle& channel_handle, | 453 const IPC::ChannelHandle& channel_handle, |
420 int guest_process_id) { | 454 int guest_process_id) { |
421 content::old::BrowserPluginRegistry* registry = | 455 content::old::BrowserPluginRegistry* registry = |
422 RenderThreadImpl::current()->browser_plugin_registry(); | 456 RenderThreadImpl::current()->browser_plugin_registry(); |
423 scoped_refptr<webkit::ppapi::PluginModule> module = | 457 scoped_refptr<webkit::ppapi::PluginModule> module = |
424 registry->GetModule(guest_process_id); | 458 registry->GetModule(guest_process_id); |
425 if (module) | 459 if (module) |
426 return module; | 460 return module; |
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1860 else | 1894 else |
1861 return render_view_->mouse_lock_dispatcher(); | 1895 return render_view_->mouse_lock_dispatcher(); |
1862 } | 1896 } |
1863 | 1897 |
1864 webkit_glue::ClipboardClient* | 1898 webkit_glue::ClipboardClient* |
1865 PepperPluginDelegateImpl::CreateClipboardClient() const { | 1899 PepperPluginDelegateImpl::CreateClipboardClient() const { |
1866 return new RendererClipboardClient; | 1900 return new RendererClipboardClient; |
1867 } | 1901 } |
1868 | 1902 |
1869 } // namespace content | 1903 } // namespace content |
OLD | NEW |