| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/renderer/trusted_plugin_channel.h" | 5 #include "components/nacl/renderer/trusted_plugin_channel.h" |
| 6 | 6 |
| 7 #include "base/callback_helpers.h" | 7 #include "base/callback_helpers.h" |
| 8 #include "components/nacl/common/nacl_renderer_messages.h" | 8 #include "components/nacl/common/nacl_renderer_messages.h" |
| 9 #include "components/nacl/renderer/nexe_load_manager.h" | 9 #include "components/nacl/renderer/nexe_load_manager.h" |
| 10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 bool TrustedPluginChannel::OnMessageReceived(const IPC::Message& msg) { | 40 bool TrustedPluginChannel::OnMessageReceived(const IPC::Message& msg) { |
| 41 bool handled = true; | 41 bool handled = true; |
| 42 IPC_BEGIN_MESSAGE_MAP(TrustedPluginChannel, msg) | 42 IPC_BEGIN_MESSAGE_MAP(TrustedPluginChannel, msg) |
| 43 IPC_MESSAGE_HANDLER(NaClRendererMsg_ReportExitStatus, OnReportExitStatus); | 43 IPC_MESSAGE_HANDLER(NaClRendererMsg_ReportExitStatus, OnReportExitStatus); |
| 44 IPC_MESSAGE_UNHANDLED(handled = false); | 44 IPC_MESSAGE_UNHANDLED(handled = false); |
| 45 IPC_END_MESSAGE_MAP() | 45 IPC_END_MESSAGE_MAP() |
| 46 return handled; | 46 return handled; |
| 47 } | 47 } |
| 48 | 48 |
| 49 void TrustedPluginChannel::OnChannelError() { |
| 50 if (report_exit_status_) |
| 51 nexe_load_manager_->NexeDidCrash(); |
| 52 } |
| 53 |
| 49 void TrustedPluginChannel::OnReportExitStatus(int exit_status) { | 54 void TrustedPluginChannel::OnReportExitStatus(int exit_status) { |
| 50 if (report_exit_status_) | 55 if (report_exit_status_) |
| 51 nexe_load_manager_->set_exit_status(exit_status); | 56 nexe_load_manager_->set_exit_status(exit_status); |
| 52 } | 57 } |
| 53 | 58 |
| 54 } // namespace nacl | 59 } // namespace nacl |
| OLD | NEW |