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 737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 void NaClProcessHost::OnPpapiChannelCreated( | 748 void NaClProcessHost::OnPpapiChannelCreated( |
749 const IPC::ChannelHandle& channel_handle) { | 749 const IPC::ChannelHandle& channel_handle) { |
750 DCHECK(enable_ipc_proxy_); | 750 DCHECK(enable_ipc_proxy_); |
751 // If the proxy channel is null, this must be the initial NaCl-Browser IPC | 751 // If the proxy channel is null, this must be the initial NaCl-Browser IPC |
752 // channel. | 752 // channel. |
753 if (!ipc_proxy_channel_.get()) { | 753 if (!ipc_proxy_channel_.get()) { |
754 ipc_proxy_channel_.reset( | 754 ipc_proxy_channel_.reset( |
755 new IPC::ChannelProxy(channel_handle, | 755 new IPC::ChannelProxy(channel_handle, |
756 IPC::Channel::MODE_CLIENT, | 756 IPC::Channel::MODE_CLIENT, |
757 &ipc_plugin_listener_, | 757 &ipc_plugin_listener_, |
758 base::MessageLoopProxy::current())); | 758 base::MessageLoopProxy::current().get())); |
759 // Enable PPAPI message dispatching to the browser process. | 759 // Enable PPAPI message dispatching to the browser process. |
760 content::EnablePepperSupportForChannel( | 760 content::EnablePepperSupportForChannel( |
761 ipc_proxy_channel_.get(), | 761 ipc_proxy_channel_.get(), |
762 chrome_render_message_filter_->GetHostResolver()); | 762 chrome_render_message_filter_->GetHostResolver()); |
763 // Send a message to create the NaCl-Renderer channel. The handle is just | 763 // Send a message to create the NaCl-Renderer channel. The handle is just |
764 // a place holder. | 764 // a place holder. |
765 ipc_proxy_channel_->Send( | 765 ipc_proxy_channel_->Send( |
766 new PpapiMsg_CreateNaClChannel( | 766 new PpapiMsg_CreateNaClChannel( |
767 chrome_render_message_filter_->render_process_id(), | 767 chrome_render_message_filter_->render_process_id(), |
768 permissions_, | 768 permissions_, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
888 } else { | 888 } else { |
889 NaClStartDebugExceptionHandlerThread( | 889 NaClStartDebugExceptionHandlerThread( |
890 process_handle.Take(), info, | 890 process_handle.Take(), info, |
891 base::MessageLoopProxy::current(), | 891 base::MessageLoopProxy::current(), |
892 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 892 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
893 weak_factory_.GetWeakPtr())); | 893 weak_factory_.GetWeakPtr())); |
894 return true; | 894 return true; |
895 } | 895 } |
896 } | 896 } |
897 #endif | 897 #endif |
OLD | NEW |