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 "chrome/browser/nacl_host/nacl_process_host.h" | 5 #include "chrome/browser/nacl_host/nacl_process_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
756 // If the proxy channel is null, this must be the initial NaCl-Browser IPC | 756 // If the proxy channel is null, this must be the initial NaCl-Browser IPC |
757 // channel. | 757 // channel. |
758 if (!ipc_proxy_channel_.get()) { | 758 if (!ipc_proxy_channel_.get()) { |
759 ipc_proxy_channel_.reset( | 759 ipc_proxy_channel_.reset( |
760 new IPC::ChannelProxy(channel_handle, | 760 new IPC::ChannelProxy(channel_handle, |
761 IPC::Channel::MODE_CLIENT, | 761 IPC::Channel::MODE_CLIENT, |
762 &ipc_plugin_listener_, | 762 &ipc_plugin_listener_, |
763 base::MessageLoopProxy::current())); | 763 base::MessageLoopProxy::current())); |
764 // Create the browser ppapi host and enable PPAPI message dispatching to the | 764 // Create the browser ppapi host and enable PPAPI message dispatching to the |
765 // browser process. | 765 // browser process. |
766 content::BrowserPpapiHost::CreateExternalPluginProcess( | 766 ppapi_host_.reset(content::BrowserPpapiHost::CreateExternalPluginProcess( |
767 process_.get(), // sender | 767 ipc_proxy_channel_.get(), //process_.get(), // sender |
768 permissions_, | 768 permissions_, |
769 process_->GetData().handle, | 769 process_->GetData().handle, |
770 ipc_proxy_channel_.get(), | 770 ipc_proxy_channel_.get(), |
771 chrome_render_message_filter_->GetHostResolver(), | 771 chrome_render_message_filter_->GetHostResolver(), |
772 chrome_render_message_filter_->render_process_id(), | 772 chrome_render_message_filter_->render_process_id(), |
773 render_view_id_); | 773 render_view_id_)); |
| 774 |
774 // Send a message to create the NaCl-Renderer channel. The handle is just | 775 // Send a message to create the NaCl-Renderer channel. The handle is just |
775 // a place holder. | 776 // a place holder. |
776 ipc_proxy_channel_->Send( | 777 ipc_proxy_channel_->Send( |
777 new PpapiMsg_CreateNaClChannel( | 778 new PpapiMsg_CreateNaClChannel( |
778 chrome_render_message_filter_->render_process_id(), | 779 chrome_render_message_filter_->render_process_id(), |
779 permissions_, | 780 permissions_, |
780 chrome_render_message_filter_->off_the_record(), | 781 chrome_render_message_filter_->off_the_record(), |
781 SerializedHandle(SerializedHandle::CHANNEL_HANDLE, | 782 SerializedHandle(SerializedHandle::CHANNEL_HANDLE, |
782 IPC::InvalidPlatformFileForTransit()))); | 783 IPC::InvalidPlatformFileForTransit()))); |
783 } else if (reply_msg_) { | 784 } else if (reply_msg_) { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
899 } else { | 900 } else { |
900 NaClStartDebugExceptionHandlerThread( | 901 NaClStartDebugExceptionHandlerThread( |
901 process_handle.Take(), info, | 902 process_handle.Take(), info, |
902 base::MessageLoopProxy::current(), | 903 base::MessageLoopProxy::current(), |
903 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 904 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
904 weak_factory_.GetWeakPtr())); | 905 weak_factory_.GetWeakPtr())); |
905 return true; | 906 return true; |
906 } | 907 } |
907 } | 908 } |
908 #endif | 909 #endif |
OLD | NEW |