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

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: - 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
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..91a6fb77a2ecc27a37f76464a46a0a914e82a540 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_ChromotingHost_HostInfo,
+ OnChromotingHostInfo)
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::OnChromotingHostInfo(
+ remoting::ChromotingHostInfo host_info) {
+ DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ if (chromoting_host_status_callback_ != NULL) {
+ chromoting_host_status_callback_->Run(host_info);
+ chromoting_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::SetChromotingHostCredentials(
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_SetChromotingHostCredentials(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::EnableChromotingHost() {
+ return Send(new ServiceMsg_EnableChromotingHost());
+}
+
+bool ServiceProcessControl::DisableChromotingHost() {
+ return Send(new ServiceMsg_DisableChromotingHost());
+}
+
+bool ServiceProcessControl::GetChromotingHostStatus(
+ GetChromotingHostStatusCallback* status_callback) {
+ DCHECK(status_callback);
+ chromoting_host_status_callback_.reset(status_callback);
+ return Send(new ServiceMsg_GetChromotingHostInfo);
}
DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcessControl);

Powered by Google App Engine
This is Rietveld 408576698