OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 IPC_MESSAGE_HANDLER(ServiceMsg_EnableCloudPrintProxy, | 102 IPC_MESSAGE_HANDLER(ServiceMsg_EnableCloudPrintProxy, |
103 OnEnableCloudPrintProxy) | 103 OnEnableCloudPrintProxy) |
104 IPC_MESSAGE_HANDLER(ServiceMsg_EnableCloudPrintProxyWithRobot, | 104 IPC_MESSAGE_HANDLER(ServiceMsg_EnableCloudPrintProxyWithRobot, |
105 OnEnableCloudPrintProxyWithRobot) | 105 OnEnableCloudPrintProxyWithRobot) |
106 IPC_MESSAGE_HANDLER(ServiceMsg_DisableCloudPrintProxy, | 106 IPC_MESSAGE_HANDLER(ServiceMsg_DisableCloudPrintProxy, |
107 OnDisableCloudPrintProxy) | 107 OnDisableCloudPrintProxy) |
108 IPC_MESSAGE_HANDLER(ServiceMsg_GetCloudPrintProxyInfo, | 108 IPC_MESSAGE_HANDLER(ServiceMsg_GetCloudPrintProxyInfo, |
109 OnGetCloudPrintProxyInfo) | 109 OnGetCloudPrintProxyInfo) |
110 IPC_MESSAGE_HANDLER(ServiceMsg_Shutdown, OnShutdown); | 110 IPC_MESSAGE_HANDLER(ServiceMsg_Shutdown, OnShutdown); |
111 IPC_MESSAGE_HANDLER(ServiceMsg_UpdateAvailable, OnUpdateAvailable); | 111 IPC_MESSAGE_HANDLER(ServiceMsg_UpdateAvailable, OnUpdateAvailable); |
| 112 IPC_MESSAGE_HANDLER(ServiceMsg_EnableVirtualDriver, |
| 113 OnEnableVirtualDriver); |
| 114 IPC_MESSAGE_HANDLER(ServiceMsg_DisableVirtualDriver, |
| 115 OnDisableVirtualDriver); |
112 IPC_MESSAGE_UNHANDLED(handled = false) | 116 IPC_MESSAGE_UNHANDLED(handled = false) |
113 IPC_END_MESSAGE_MAP() | 117 IPC_END_MESSAGE_MAP() |
114 return handled; | 118 return handled; |
115 } | 119 } |
116 | 120 |
117 void ServiceIPCServer::OnEnableCloudPrintProxy(const std::string& lsid) { | 121 void ServiceIPCServer::OnEnableCloudPrintProxy(const std::string& lsid) { |
118 g_service_process->GetCloudPrintProxy()->EnableForUser(lsid); | 122 g_service_process->GetCloudPrintProxy()->EnableForUser(lsid); |
119 } | 123 } |
120 | 124 |
121 void ServiceIPCServer::OnEnableCloudPrintProxyWithRobot( | 125 void ServiceIPCServer::OnEnableCloudPrintProxyWithRobot( |
(...skipping 16 matching lines...) Expand all Loading... |
138 g_service_process->GetCloudPrintProxy()->DisableForUser(); | 142 g_service_process->GetCloudPrintProxy()->DisableForUser(); |
139 } | 143 } |
140 | 144 |
141 void ServiceIPCServer::OnShutdown() { | 145 void ServiceIPCServer::OnShutdown() { |
142 g_service_process->Shutdown(); | 146 g_service_process->Shutdown(); |
143 } | 147 } |
144 | 148 |
145 void ServiceIPCServer::OnUpdateAvailable() { | 149 void ServiceIPCServer::OnUpdateAvailable() { |
146 g_service_process->SetUpdateAvailable(); | 150 g_service_process->SetUpdateAvailable(); |
147 } | 151 } |
| 152 |
| 153 void ServiceIPCServer::OnEnableVirtualDriver() { |
| 154 g_service_process->EnableVirtualPrintDriver(); |
| 155 } |
| 156 |
| 157 void ServiceIPCServer::OnDisableVirtualDriver() { |
| 158 g_service_process->DisableVirtualPrintDriver(); |
| 159 } |
| 160 |
OLD | NEW |