| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/service/service_ipc_server.h" | 5 #include "chrome/service/service_ipc_server.h" |
| 6 | 6 |
| 7 #include "chrome/common/service_messages.h" | 7 #include "chrome/common/service_messages.h" |
| 8 #include "chrome/service/cloud_print/cloud_print_proxy.h" | 8 #include "chrome/service/cloud_print/cloud_print_proxy.h" |
| 9 #include "chrome/service/service_process.h" | 9 #include "chrome/service/service_process.h" |
| 10 #include "ipc/ipc_logging.h" | 10 #include "ipc/ipc_logging.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 #if defined(ENABLE_REMOTING) | 125 #if defined(ENABLE_REMOTING) |
| 126 void ServiceIPCServer::OnSetRemotingHostCredentials( | 126 void ServiceIPCServer::OnSetRemotingHostCredentials( |
| 127 const std::string& login, | 127 const std::string& login, |
| 128 const std::string& auth_token) { | 128 const std::string& auth_token) { |
| 129 g_service_process->remoting_host_manager()->SetCredentials( | 129 g_service_process->remoting_host_manager()->SetCredentials( |
| 130 login, auth_token); | 130 login, auth_token); |
| 131 } | 131 } |
| 132 | 132 |
| 133 void ServiceIPCServer::OnEnableRemotingHost() { | 133 void ServiceIPCServer::OnEnableRemotingHost() { |
| 134 g_service_process->remoting_host_manager()->Enable(); | 134 g_service_process->remoting_host_manager()->Enable(); |
| 135 SendRemotingHostInfo(); |
| 135 } | 136 } |
| 136 | 137 |
| 137 void ServiceIPCServer:: OnDisableRemotingHost() { | 138 void ServiceIPCServer::OnDisableRemotingHost() { |
| 138 g_service_process->remoting_host_manager()->Disable(); | 139 g_service_process->remoting_host_manager()->Disable(); |
| 140 SendRemotingHostInfo(); |
| 139 } | 141 } |
| 140 | 142 |
| 141 void ServiceIPCServer:: OnGetRemotingHostInfo() { | 143 void ServiceIPCServer::OnGetRemotingHostInfo() { |
| 144 SendRemotingHostInfo(); |
| 145 } |
| 146 |
| 147 void ServiceIPCServer::SendRemotingHostInfo() { |
| 142 remoting::ChromotingHostInfo host_info; | 148 remoting::ChromotingHostInfo host_info; |
| 143 g_service_process->remoting_host_manager()->GetHostInfo(&host_info); | 149 g_service_process->remoting_host_manager()->GetHostInfo(&host_info); |
| 144 channel_->Send(new ServiceHostMsg_RemotingHost_HostInfo(host_info)); | 150 channel_->Send(new ServiceHostMsg_RemotingHost_HostInfo(host_info)); |
| 145 } | 151 } |
| 146 #endif // defined(ENABLE_REMOTING) | 152 #endif // defined(ENABLE_REMOTING) |
| 147 | 153 |
| 148 void ServiceIPCServer::OnDisableCloudPrintProxy() { | 154 void ServiceIPCServer::OnDisableCloudPrintProxy() { |
| 149 g_service_process->GetCloudPrintProxy()->DisableForUser(); | 155 g_service_process->GetCloudPrintProxy()->DisableForUser(); |
| 150 } | 156 } |
| 151 | 157 |
| 152 void ServiceIPCServer::OnShutdown() { | 158 void ServiceIPCServer::OnShutdown() { |
| 153 g_service_process->Shutdown(); | 159 g_service_process->Shutdown(); |
| 154 } | 160 } |
| 155 | 161 |
| 156 void ServiceIPCServer::OnUpdateAvailable() { | 162 void ServiceIPCServer::OnUpdateAvailable() { |
| 157 g_service_process->SetUpdateAvailable(); | 163 g_service_process->SetUpdateAvailable(); |
| 158 } | 164 } |
| OLD | NEW |