diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 19:31:40 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 19:31:40 +0000 |
commit | 809e10f57b8bbfb1b780e3963a7466b15aef45bf (patch) | |
tree | 00b8867d566bf0c968b519bac4f036846d0c1612 /chrome/service/service_ipc_server.cc | |
parent | 1edeeaf2c02be8d62dd57a348b6a4d0e57604448 (diff) | |
download | chromium_src-809e10f57b8bbfb1b780e3963a7466b15aef45bf.zip chromium_src-809e10f57b8bbfb1b780e3963a7466b15aef45bf.tar.gz chromium_src-809e10f57b8bbfb1b780e3963a7466b15aef45bf.tar.bz2 |
Remove chromoting host registration from service process. More IPCs to control
host state.
BUG=None
TEST=Unittests.
Review URL: http://codereview.chromium.org/5955001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70081 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/service/service_ipc_server.cc')
-rw-r--r-- | chrome/service/service_ipc_server.cc | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/chrome/service/service_ipc_server.cc b/chrome/service/service_ipc_server.cc index 71ae5d7..c7280c3 100644 --- a/chrome/service/service_ipc_server.cc +++ b/chrome/service/service_ipc_server.cc @@ -83,12 +83,20 @@ void ServiceIPCServer::OnMessageReceived(const IPC::Message& msg) { OnEnableCloudPrintProxy) IPC_MESSAGE_HANDLER(ServiceMsg_EnableCloudPrintProxyWithTokens, OnEnableCloudPrintProxyWithTokens) - IPC_MESSAGE_HANDLER(ServiceMsg_EnableRemotingWithTokens, - OnEnableRemotingWithTokens) IPC_MESSAGE_HANDLER(ServiceMsg_DisableCloudPrintProxy, OnDisableCloudPrintProxy) IPC_MESSAGE_HANDLER(ServiceMsg_IsCloudPrintProxyEnabled, OnIsCloudPrintProxyEnabled) +#if defined(ENABLE_REMOTING) + IPC_MESSAGE_HANDLER(ServiceMsg_SetRemotingHostCredentials, + OnSetRemotingHostCredentials) + IPC_MESSAGE_HANDLER(ServiceMsg_EnableRemotingHost, + OnEnableRemotingHost) + IPC_MESSAGE_HANDLER(ServiceMsg_DisableRemotingHost, + OnDisableRemotingHost) + IPC_MESSAGE_HANDLER(ServiceMsg_GetRemotingHostInfo, + OnGetRemotingHostInfo) +#endif // defined(ENABLE_REMOTING) IPC_MESSAGE_HANDLER(ServiceMsg_Hello, OnHello); IPC_MESSAGE_HANDLER(ServiceMsg_Shutdown, OnShutdown); IPC_MESSAGE_HANDLER(ServiceMsg_UpdateAvailable, OnUpdateAvailable); @@ -112,16 +120,29 @@ void ServiceIPCServer::OnIsCloudPrintProxyEnabled() { email)); } -void ServiceIPCServer::OnEnableRemotingWithTokens( - const std::string& login, - const std::string& remoting_token, - const std::string& talk_token) { #if defined(ENABLE_REMOTING) - g_service_process->EnableChromotingHostWithTokens(login, remoting_token, - talk_token); -#endif +void ServiceIPCServer::OnSetRemotingHostCredentials( + const std::string& login, + const std::string& auth_token) { + g_service_process->remoting_host_manager()->SetCredentials( + login, auth_token); +} + +void ServiceIPCServer::OnEnableRemotingHost() { + g_service_process->remoting_host_manager()->Enable(); } +void ServiceIPCServer:: OnDisableRemotingHost() { + g_service_process->remoting_host_manager()->Disable(); +} + +void ServiceIPCServer:: OnGetRemotingHostInfo() { + remoting::ChromotingHostInfo host_info; + g_service_process->remoting_host_manager()->GetHostInfo(&host_info); + channel_->Send(new ServiceHostMsg_RemotingHost_HostInfo(host_info)); +} +#endif // defined(ENABLE_REMOTING) + void ServiceIPCServer::OnDisableCloudPrintProxy() { g_service_process->GetCloudPrintProxy()->DisableForUser(); } @@ -137,4 +158,3 @@ void ServiceIPCServer::OnShutdown() { void ServiceIPCServer::OnUpdateAvailable() { g_service_process->SetUpdateAvailable(); } - |