Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: chrome/browser/service/service_process_control.cc

Issue 5955001: Remove chromoting host registration from service process. More IPCs to control (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merges Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/service/service_process_control.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/service/service_process_control.cc
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc
index bd98319d5a7e3acc0677ffe73afc2ad9d7786227..dfba80a22ab93bea45b4de59ce34867ac5bbe4dd 100644
--- a/chrome/browser/service/service_process_control.cc
+++ b/chrome/browser/service/service_process_control.cc
@@ -243,6 +243,8 @@ void ServiceProcessControl::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(ServiceHostMsg_GoodDay, OnGoodDay)
IPC_MESSAGE_HANDLER(ServiceHostMsg_CloudPrintProxy_IsEnabled,
OnCloudPrintProxyIsEnabled)
+ IPC_MESSAGE_HANDLER(ServiceHostMsg_RemotingHost_HostInfo,
+ OnRemotingHostInfo)
IPC_END_MESSAGE_MAP()
}
@@ -273,7 +275,6 @@ void ServiceProcessControl::Observe(NotificationType type,
}
}
-
void ServiceProcessControl::OnGoodDay() {
if (!message_handler_)
return;
@@ -290,6 +291,22 @@ void ServiceProcessControl::OnCloudPrintProxyIsEnabled(bool enabled,
}
}
+void ServiceProcessControl::OnRemotingHostInfo(
+ remoting::ChromotingHostInfo host_info) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ if (remoting_host_status_callback_ != NULL) {
+ remoting_host_status_callback_->Run(host_info);
+ remoting_host_status_callback_.reset();
+ }
+}
+
+bool ServiceProcessControl::GetCloudPrintProxyStatus(
+ Callback2<bool, std::string>::Type* cloud_print_status_callback) {
+ DCHECK(cloud_print_status_callback);
+ cloud_print_status_callback_.reset(cloud_print_status_callback);
+ return Send(new ServiceMsg_IsCloudPrintProxyEnabled);
+}
+
bool ServiceProcessControl::SendHello() {
return Send(new ServiceMsg_Hello());
}
@@ -300,20 +317,26 @@ bool ServiceProcessControl::Shutdown() {
return ret;
}
-bool ServiceProcessControl::EnableRemotingWithTokens(
+bool ServiceProcessControl::SetRemotingHostCredentials(
const std::string& user,
- const std::string& remoting_token,
const std::string& talk_token) {
return Send(
- new ServiceMsg_EnableRemotingWithTokens(user, remoting_token,
- talk_token));
+ new ServiceMsg_SetRemotingHostCredentials(user, talk_token));
}
-bool ServiceProcessControl::GetCloudPrintProxyStatus(
- Callback2<bool, std::string>::Type* cloud_print_status_callback) {
- DCHECK(cloud_print_status_callback);
- cloud_print_status_callback_.reset(cloud_print_status_callback);
- return Send(new ServiceMsg_IsCloudPrintProxyEnabled);
+bool ServiceProcessControl::EnableRemotingHost() {
+ return Send(new ServiceMsg_EnableRemotingHost());
+}
+
+bool ServiceProcessControl::DisableRemotingHost() {
+ return Send(new ServiceMsg_DisableRemotingHost());
+}
+
+bool ServiceProcessControl::GetRemotingHostStatus(
+ GetRemotingHostStatusCallback* status_callback) {
+ DCHECK(status_callback);
+ remoting_host_status_callback_.reset(status_callback);
+ return Send(new ServiceMsg_GetRemotingHostInfo);
}
DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcessControl);
« no previous file with comments | « chrome/browser/service/service_process_control.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698