Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(725)

Side by Side Diff: components/nacl/renderer/trusted_plugin_channel.cc

Issue 512323002: NaCl: Detect plugin crashes via EOF on Chromium IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « components/nacl/renderer/trusted_plugin_channel.h ('k') | ppapi/api/private/ppb_nacl_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698