| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/renderer/pepper_plugin_delegate_impl.h" | 5 #include "chrome/renderer/pepper_plugin_delegate_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "app/surface/transport_dib.h" | 9 #include "app/surface/transport_dib.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 }; | 355 }; |
| 356 | 356 |
| 357 bool DispatcherWrapper::Init( | 357 bool DispatcherWrapper::Init( |
| 358 base::ProcessHandle plugin_process_handle, | 358 base::ProcessHandle plugin_process_handle, |
| 359 IPC::ChannelHandle channel_handle, | 359 IPC::ChannelHandle channel_handle, |
| 360 PP_Module pp_module, | 360 PP_Module pp_module, |
| 361 pp::proxy::Dispatcher::GetInterfaceFunc local_get_interface) { | 361 pp::proxy::Dispatcher::GetInterfaceFunc local_get_interface) { |
| 362 dispatcher_.reset(new pp::proxy::HostDispatcher( | 362 dispatcher_.reset(new pp::proxy::HostDispatcher( |
| 363 plugin_process_handle, pp_module, local_get_interface)); | 363 plugin_process_handle, pp_module, local_get_interface)); |
| 364 | 364 |
| 365 if (!dispatcher_->InitWithChannel( | 365 if (!dispatcher_->InitWithChannel(PepperPluginRegistry::GetInstance(), |
| 366 ChildProcess::current()->io_message_loop(), channel_handle, | 366 channel_handle, true)) { |
| 367 true, ChildProcess::current()->GetShutDownEvent())) { | |
| 368 dispatcher_.reset(); | 367 dispatcher_.reset(); |
| 369 return false; | 368 return false; |
| 370 } | 369 } |
| 371 return true; | 370 return true; |
| 372 } | 371 } |
| 373 | 372 |
| 374 } // namespace | 373 } // namespace |
| 375 | 374 |
| 376 PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderView* render_view) | 375 PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderView* render_view) |
| 377 : render_view_(render_view), | 376 : render_view_(render_view), |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 909 } | 908 } |
| 910 | 909 |
| 911 void PepperPluginDelegateImpl::HasUnsupportedFeature() { | 910 void PepperPluginDelegateImpl::HasUnsupportedFeature() { |
| 912 render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature( | 911 render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature( |
| 913 render_view_->routing_id())); | 912 render_view_->routing_id())); |
| 914 } | 913 } |
| 915 | 914 |
| 916 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() { | 915 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() { |
| 917 return render_view_->p2p_socket_dispatcher(); | 916 return render_view_->p2p_socket_dispatcher(); |
| 918 } | 917 } |
| OLD | NEW |