OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 return handled; | 104 return handled; |
105 } | 105 } |
106 | 106 |
107 void ServiceIPCServer::OnEnableCloudPrintProxy(const std::string& lsid) { | 107 void ServiceIPCServer::OnEnableCloudPrintProxy(const std::string& lsid) { |
108 g_service_process->GetCloudPrintProxy()->EnableForUser(lsid); | 108 g_service_process->GetCloudPrintProxy()->EnableForUser(lsid); |
109 } | 109 } |
110 | 110 |
111 void ServiceIPCServer::OnEnableCloudPrintProxyWithRobot( | 111 void ServiceIPCServer::OnEnableCloudPrintProxyWithRobot( |
112 const std::string& robot_auth_code, | 112 const std::string& robot_auth_code, |
113 const std::string& robot_email, | 113 const std::string& robot_email, |
114 const std::string& user_email) { | 114 const std::string& user_email, |
| 115 bool connect_new_printers, |
| 116 const std::vector<std::string>& printer_blacklist) { |
115 g_service_process->GetCloudPrintProxy()->EnableForUserWithRobot( | 117 g_service_process->GetCloudPrintProxy()->EnableForUserWithRobot( |
116 robot_auth_code, | 118 robot_auth_code, robot_email, user_email, connect_new_printers, |
117 robot_email, | 119 printer_blacklist); |
118 user_email); | |
119 } | 120 } |
120 | 121 |
121 void ServiceIPCServer::OnGetCloudPrintProxyInfo() { | 122 void ServiceIPCServer::OnGetCloudPrintProxyInfo() { |
122 cloud_print::CloudPrintProxyInfo info; | 123 cloud_print::CloudPrintProxyInfo info; |
123 g_service_process->GetCloudPrintProxy()->GetProxyInfo(&info); | 124 g_service_process->GetCloudPrintProxy()->GetProxyInfo(&info); |
124 channel_->Send(new ServiceHostMsg_CloudPrintProxy_Info(info)); | 125 channel_->Send(new ServiceHostMsg_CloudPrintProxy_Info(info)); |
125 } | 126 } |
126 | 127 |
127 void ServiceIPCServer::OnDisableCloudPrintProxy() { | 128 void ServiceIPCServer::OnDisableCloudPrintProxy() { |
128 // User disabled CloudPrint proxy explicitly. Delete printers | 129 // User disabled CloudPrint proxy explicitly. Delete printers |
129 // registered from this proxy and disable proxy. | 130 // registered from this proxy and disable proxy. |
130 g_service_process->GetCloudPrintProxy()-> | 131 g_service_process->GetCloudPrintProxy()-> |
131 UnregisterPrintersAndDisableForUser(); | 132 UnregisterPrintersAndDisableForUser(); |
132 } | 133 } |
133 | 134 |
134 void ServiceIPCServer::OnShutdown() { | 135 void ServiceIPCServer::OnShutdown() { |
135 g_service_process->Shutdown(); | 136 g_service_process->Shutdown(); |
136 } | 137 } |
137 | 138 |
138 void ServiceIPCServer::OnUpdateAvailable() { | 139 void ServiceIPCServer::OnUpdateAvailable() { |
139 g_service_process->SetUpdateAvailable(); | 140 g_service_process->SetUpdateAvailable(); |
140 } | 141 } |
141 | 142 |
OLD | NEW |