diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 02:10:16 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-10 02:10:16 +0000 |
commit | 7c9a9cb4c16ffa5599eb8cba63109adbfac9b2d0 (patch) | |
tree | 470d6add943eb597c40a342062eeb09bb4a3cb16 /chrome/common/child_process_host.h | |
parent | 3a1abcfe03959dd877ebadcffde373a54fb2c661 (diff) | |
download | chromium_src-7c9a9cb4c16ffa5599eb8cba63109adbfac9b2d0.zip chromium_src-7c9a9cb4c16ffa5599eb8cba63109adbfac9b2d0.tar.gz chromium_src-7c9a9cb4c16ffa5599eb8cba63109adbfac9b2d0.tar.bz2 |
Revert "plugins: use OnChannelError to detect when the channel goes away"
This reverts commit r20349.
Unit test failure. I suspect the test, but let's keep the tree green.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_host.h')
-rw-r--r-- | chrome/common/child_process_host.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/chrome/common/child_process_host.h b/chrome/common/child_process_host.h index 3b97200..caabe66 100644 --- a/chrome/common/child_process_host.h +++ b/chrome/common/child_process_host.h @@ -10,6 +10,7 @@ #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" @@ -18,6 +19,7 @@ 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(); @@ -76,8 +78,8 @@ class ChildProcessHost : public ResourceDispatcherHost::Receiver, // Sends the given notification to the notification service on the UI thread. void Notify(NotificationType type); - // Called when the child process goes away. - void OnChildDied(); + // WaitableEventWatcher::Delegate implementation: + virtual void OnWaitableEventSignaled(base::WaitableEvent *event); // By using an internal class as the IPC::Channel::Listener, we can intercept // OnMessageReceived/OnChannelConnected and do our own processing before @@ -104,6 +106,11 @@ 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_ |