From f177ffd84b0f1b94de05fa0166520783cb5cddb9 Mon Sep 17 00:00:00 2001 From: "jam@chromium.org" Date: Fri, 20 Jan 2012 07:51:54 +0000 Subject: Revert 118415 - Add a Content API around BrowserChildProcessHost, similar to what was done with ChildProcessHost. Now classes like PluginProcessHost don't derive from it, but instead use composition. I've also moved the iterator class into its own file in the public directory. Since classes don't derive from BrowserChildProcessHost and so can't static_cast from it, I added a template helper that does this. BUG=98716 Review URL: https://chromiumcodereview.appspot.com/9150017 TBR=jam@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118420 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/service/service_utility_process_host.cc | 7 +++++++ chrome/service/service_utility_process_host.h | 2 ++ 2 files changed, 9 insertions(+) (limited to 'chrome/service') diff --git a/chrome/service/service_utility_process_host.cc b/chrome/service/service_utility_process_host.cc index e3a0000..91f6627 100644 --- a/chrome/service/service_utility_process_host.cc +++ b/chrome/service/service_utility_process_host.cc @@ -152,6 +152,10 @@ FilePath ServiceUtilityProcessHost::GetUtilityProcessCmd() { return ChildProcessHost::GetChildPath(flags); } +bool ServiceUtilityProcessHost::CanShutdown() { + return true; +} + void ServiceUtilityProcessHost::OnChildDisconnected() { if (waiting_for_reply_) { // If we are yet to receive a reply then notify the client that the @@ -162,6 +166,9 @@ void ServiceUtilityProcessHost::OnChildDisconnected() { delete this; } +void ServiceUtilityProcessHost::ShutdownStarted() { +} + bool ServiceUtilityProcessHost::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(ServiceUtilityProcessHost, message) diff --git a/chrome/service/service_utility_process_host.h b/chrome/service/service_utility_process_host.h index 3fb3a45..0b91776 100644 --- a/chrome/service/service_utility_process_host.h +++ b/chrome/service/service_utility_process_host.h @@ -108,7 +108,9 @@ class ServiceUtilityProcessHost : public content::ChildProcessHostDelegate { virtual FilePath GetUtilityProcessCmd(); // ChildProcessHostDelegate implementation: + virtual bool CanShutdown() OVERRIDE; virtual void OnChildDisconnected() OVERRIDE; + virtual void ShutdownStarted() OVERRIDE; virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; private: -- cgit v1.1