diff options
Diffstat (limited to 'chrome/service/service_process.cc')
-rw-r--r-- | chrome/service/service_process.cc | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/chrome/service/service_process.cc b/chrome/service/service_process.cc index 77e8cf0..9e5da1a 100644 --- a/chrome/service/service_process.cc +++ b/chrome/service/service_process.cc @@ -122,6 +122,17 @@ CloudPrintProxy* ServiceProcess::GetCloudPrintProxy() { } #if defined(ENABLE_REMOTING) +bool ServiceProcess::EnableChromotingHostWithTokens( + const std::string& login, + const std::string& remoting_token, + const std::string& talk_token) { + remoting_directory_.reset(new RemotingDirectoryService(this)); + + // TODO(hclam): Complete the API calling to the remoting directory. + remoting_directory_->AddHost(remoting_token); + return true; +} + bool ServiceProcess::StartChromotingHost() { // We have already started. if (chromoting_context_.get()) @@ -180,6 +191,19 @@ bool ServiceProcess::ShutdownChromotingHost() { return true; } +void ServiceProcess::OnRemotingHostAdded() { + // TODO(hclam): Need to save the keys and configuration here. + // TODO(hclam): If we have a problem we need to send an IPC message back + // to the client that started this. + bool ret = StartChromotingHost(); + DCHECK(ret); +} + +void ServiceProcess::OnRemotingDirectoryError() { + // TODO(hclam): Implement. + NOTIMPLEMENTED() << "Remoting directory error"; +} + // A util function to update the login information to host config. static void SaveChromotingConfigFunc(remoting::JsonHostConfig* config, const std::string& login, |