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 "components/nacl/browser/nacl_process_host.h" | 5 #include "components/nacl/browser/nacl_process_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 } | 765 } |
766 | 766 |
767 void NaClProcessHost::SendErrorToRenderer(const std::string& error_message) { | 767 void NaClProcessHost::SendErrorToRenderer(const std::string& error_message) { |
768 LOG(ERROR) << "NaCl process launch failed: " << error_message; | 768 LOG(ERROR) << "NaCl process launch failed: " << error_message; |
769 SendMessageToRenderer(NaClLaunchResult(), error_message); | 769 SendMessageToRenderer(NaClLaunchResult(), error_message); |
770 } | 770 } |
771 | 771 |
772 void NaClProcessHost::SendMessageToRenderer( | 772 void NaClProcessHost::SendMessageToRenderer( |
773 const NaClLaunchResult& result, | 773 const NaClLaunchResult& result, |
774 const std::string& error_message) { | 774 const std::string& error_message) { |
775 DCHECK(nacl_host_message_filter_); | 775 DCHECK(nacl_host_message_filter_.get()); |
776 DCHECK(reply_msg_); | 776 DCHECK(reply_msg_); |
777 if (nacl_host_message_filter_ != NULL && reply_msg_ != NULL) { | 777 if (nacl_host_message_filter_.get() != NULL && reply_msg_ != NULL) { |
778 NaClHostMsg_LaunchNaCl::WriteReplyParams( | 778 NaClHostMsg_LaunchNaCl::WriteReplyParams( |
779 reply_msg_, result, error_message); | 779 reply_msg_, result, error_message); |
780 nacl_host_message_filter_->Send(reply_msg_); | 780 nacl_host_message_filter_->Send(reply_msg_); |
781 nacl_host_message_filter_ = NULL; | 781 nacl_host_message_filter_ = NULL; |
782 reply_msg_ = NULL; | 782 reply_msg_ = NULL; |
783 } | 783 } |
784 } | 784 } |
785 | 785 |
786 void NaClProcessHost::SetDebugStubPort(int port) { | 786 void NaClProcessHost::SetDebugStubPort(int port) { |
787 NaClBrowser* nacl_browser = NaClBrowser::GetInstance(); | 787 NaClBrowser* nacl_browser = NaClBrowser::GetInstance(); |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1168 process_handle.Take(), info, | 1168 process_handle.Take(), info, |
1169 base::MessageLoopProxy::current(), | 1169 base::MessageLoopProxy::current(), |
1170 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, | 1170 base::Bind(&NaClProcessHost::OnDebugExceptionHandlerLaunchedByBroker, |
1171 weak_factory_.GetWeakPtr())); | 1171 weak_factory_.GetWeakPtr())); |
1172 return true; | 1172 return true; |
1173 } | 1173 } |
1174 } | 1174 } |
1175 #endif | 1175 #endif |
1176 | 1176 |
1177 } // namespace nacl | 1177 } // namespace nacl |
OLD | NEW |