Chromium Code Reviews| Index: chrome/service/service_ipc_server.cc |
| diff --git a/chrome/service/service_ipc_server.cc b/chrome/service/service_ipc_server.cc |
| index 71ae5d75d849d95c35883c939121550137de6901..ae0a4f34a425c2916f0a5affe063f614a3065504 100644 |
| --- a/chrome/service/service_ipc_server.cc |
| +++ b/chrome/service/service_ipc_server.cc |
| @@ -83,12 +83,18 @@ 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) |
| + IPC_MESSAGE_HANDLER(ServiceMsg_SetChromotingHostCredentials, |
|
Alpha Left Google
2010/12/16 21:32:44
Use ifdef here.
Sergey Ulanov
2010/12/17 00:05:43
Done.
|
| + OnSetChromotingHostCredentials) |
| + IPC_MESSAGE_HANDLER(ServiceMsg_EnableChromotingHost, |
| + OnEnableChromotingHost) |
| + IPC_MESSAGE_HANDLER(ServiceMsg_DisableChromotingHost, |
| + OnDisableChromotingHost) |
| + IPC_MESSAGE_HANDLER(ServiceMsg_GetChromotingHostInfo, |
| + OnGetChromotingHostInfo) |
| IPC_MESSAGE_HANDLER(ServiceMsg_Hello, OnHello); |
| IPC_MESSAGE_HANDLER(ServiceMsg_Shutdown, OnShutdown); |
| IPC_MESSAGE_HANDLER(ServiceMsg_UpdateAvailable, OnUpdateAvailable); |
| @@ -112,13 +118,32 @@ void ServiceIPCServer::OnIsCloudPrintProxyEnabled() { |
| email)); |
| } |
| -void ServiceIPCServer::OnEnableRemotingWithTokens( |
| +void ServiceIPCServer::OnSetChromotingHostCredentials( |
| const std::string& login, |
| - const std::string& remoting_token, |
| - const std::string& talk_token) { |
| + const std::string& auth_token) { |
| #if defined(ENABLE_REMOTING) |
|
Alpha Left Google
2010/12/16 21:32:44
Use one ifdef to include there all.
Sergey Ulanov
2010/12/17 00:05:43
Done.
|
| - g_service_process->EnableChromotingHostWithTokens(login, remoting_token, |
| - talk_token); |
| + g_service_process->chromoting_host_manager()->SetCredentials( |
| + login, auth_token); |
| +#endif |
| +} |
| + |
| +void ServiceIPCServer::OnEnableChromotingHost() { |
| +#if defined(ENABLE_REMOTING) |
| + g_service_process->chromoting_host_manager()->Enable(); |
| +#endif |
| +} |
| + |
| +void ServiceIPCServer:: OnDisableChromotingHost() { |
| +#if defined(ENABLE_REMOTING) |
| + g_service_process->chromoting_host_manager()->Disable(); |
| +#endif |
| +} |
| + |
| +void ServiceIPCServer:: OnGetChromotingHostInfo() { |
| +#if defined(ENABLE_REMOTING) |
| + remoting::ChromotingHostInfo host_info; |
| + g_service_process->chromoting_host_manager()->GetHostInfo(&host_info); |
| + channel_->Send(new ServiceHostMsg_ChromotingHost_HostInfo(host_info)); |
| #endif |
| } |
| @@ -137,4 +162,3 @@ void ServiceIPCServer::OnShutdown() { |
| void ServiceIPCServer::OnUpdateAvailable() { |
| g_service_process->SetUpdateAvailable(); |
| } |
| - |