summaryrefslogtreecommitdiffstats
path: root/chrome/common/child_process_host.h
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 20:53:11 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-10 20:53:11 +0000
commit219b56462b4589bcbf513568033a3f24bdb29fdf (patch)
treef7d3c0d8b8c6052ac85c03eb702e238dc3dd7b56 /chrome/common/child_process_host.h
parent7d2751d59294a8ea3ef67987ae7469ca4e6af935 (diff)
downloadchromium_src-219b56462b4589bcbf513568033a3f24bdb29fdf.zip
chromium_src-219b56462b4589bcbf513568033a3f24bdb29fdf.tar.gz
chromium_src-219b56462b4589bcbf513568033a3f24bdb29fdf.tar.bz2
plugins: use OnChannelError to detect when the channel goes away
Previously we used a special Watcher object to watch the process, but that is not portable to POSIX and this is simpler anyway. With this change, I now see ~PluginProcessHost() running when a plugin crashes. If you recall all the way back to http://codereview.chromium.org/16814 we did a similar thing to the renderer host. Review URL: http://codereview.chromium.org/155331 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_host.h')
-rw-r--r--chrome/common/child_process_host.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/chrome/common/child_process_host.h b/chrome/common/child_process_host.h
index caabe66..3b97200 100644
--- a/chrome/common/child_process_host.h
+++ b/chrome/common/child_process_host.h
@@ -10,7 +10,6 @@
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
-#include "base/waitable_event_watcher.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/common/ipc_channel.h"
@@ -19,7 +18,6 @@ class NotificationType;
// Plugins/workers and other child processes that live on the IO thread should
// derive from this class.
class ChildProcessHost : public ResourceDispatcherHost::Receiver,
- public base::WaitableEventWatcher::Delegate,
public IPC::Channel::Listener {
public:
virtual ~ChildProcessHost();
@@ -78,8 +76,8 @@ class ChildProcessHost : public ResourceDispatcherHost::Receiver,
// Sends the given notification to the notification service on the UI thread.
void Notify(NotificationType type);
- // WaitableEventWatcher::Delegate implementation:
- virtual void OnWaitableEventSignaled(base::WaitableEvent *event);
+ // Called when the child process goes away.
+ void OnChildDied();
// By using an internal class as the IPC::Channel::Listener, we can intercept
// OnMessageReceived/OnChannelConnected and do our own processing before
@@ -106,11 +104,6 @@ class ChildProcessHost : public ResourceDispatcherHost::Receiver,
// IPC Channel's id.
std::string channel_id_;
-
- // Used to watch the child process handle.
- base::WaitableEventWatcher watcher_;
-
- scoped_ptr<base::WaitableEvent> process_event_;
};
#endif // CHROME_COMMON_CHILD_PROCESS_HOST_H_