diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-07 22:37:38 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-07 22:37:38 +0000 |
commit | 17543d6da3e6078109e25358481fd3bbd98ab587 (patch) | |
tree | 9d92d94d76db72a6feb4becc2e7f77ec89ebcf10 /chrome/service/service_ipc_server.cc | |
parent | 4c974a138a20ec387ad0f347ca6d0804f26de74e (diff) | |
download | chromium_src-17543d6da3e6078109e25358481fd3bbd98ab587.zip chromium_src-17543d6da3e6078109e25358481fd3bbd98ab587.tar.gz chromium_src-17543d6da3e6078109e25358481fd3bbd98ab587.tar.bz2 |
All communication with the cloud print proxy service from the browser now happens in the CloudPrintProxyService class. Added code to start the service process if the cloud print proxy was enabled. Also, when detect an auto-update, we send an IPC to the service process. The service process then shuts down when the browser disconnects.
BUG=None
TEST=Unit-tests, test Cloud Print proxy UI, test that when an update is available, the service process shuts down when the browser does.
TBR=phajdan.jr
Review URL: http://codereview.chromium.org/3617008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/service_ipc_server.cc')
-rw-r--r-- | chrome/service/service_ipc_server.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/chrome/service/service_ipc_server.cc b/chrome/service/service_ipc_server.cc index f912701..ae80d42 100644 --- a/chrome/service/service_ipc_server.cc +++ b/chrome/service/service_ipc_server.cc @@ -61,8 +61,11 @@ void ServiceIPCServer::OnChannelError() { // client requests, we will recreate the channel. bool client_was_connected = client_connected_; client_connected_ = false; - if (client_was_connected) + // TODO(sanjeevr): Instead of invoking the service process for such handlers, + // define a Client interface that the ServiceProcess can implement. + if (client_was_connected && g_service_process->HandleClientDisconnect()) { CreateChannel(); + } } bool ServiceIPCServer::Send(IPC::Message* msg) { @@ -88,6 +91,7 @@ void ServiceIPCServer::OnMessageReceived(const IPC::Message& msg) { OnIsCloudPrintProxyEnabled) IPC_MESSAGE_HANDLER(ServiceMsg_Hello, OnHello); IPC_MESSAGE_HANDLER(ServiceMsg_Shutdown, OnShutdown); + IPC_MESSAGE_HANDLER(ServiceMsg_UpdateAvailable, OnUpdateAvailable); IPC_END_MESSAGE_MAP() } @@ -129,3 +133,8 @@ void ServiceIPCServer::OnHello() { void ServiceIPCServer::OnShutdown() { g_service_process->Shutdown(); } + +void ServiceIPCServer::OnUpdateAvailable() { + g_service_process->SetUpdateAvailable(); +} + |