1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_MESSAGE_HANDLER_H_
6 #define CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_MESSAGE_HANDLER_H_
10 #include "base/macros.h"
11 #include "chrome/service/cloud_print/cloud_print_proxy.h"
12 #include "chrome/service/service_ipc_server.h"
15 class DictionaryValue
;
23 namespace cloud_print
{
25 // Handles IPC messages for Cloud Print. Lives on the main thread.
26 class CloudPrintMessageHandler
: public ServiceIPCServer::MessageHandler
{
28 CloudPrintMessageHandler(IPC::Sender
* ipc_sender
,
29 CloudPrintProxy::Provider
* proxy_provider
);
30 ~CloudPrintMessageHandler() override
;
32 // ServiceIPCServer::MessageHandler implementation.
33 bool HandleMessage(const IPC::Message
& message
) override
;
36 // IPC message handlers.
37 void OnEnableCloudPrintProxyWithRobot(
38 const std::string
& robot_auth_code
,
39 const std::string
& robot_email
,
40 const std::string
& user_email
,
41 const base::DictionaryValue
& user_settings
);
42 void OnGetCloudPrintProxyInfo();
44 void OnDisableCloudPrintProxy();
46 IPC::Sender
* ipc_sender_
; // Owned by our owner.
47 CloudPrintProxy::Provider
* proxy_provider_
; // Owned by our owner.
49 DISALLOW_COPY_AND_ASSIGN(CloudPrintMessageHandler
);
52 } // namespace cloud_print
54 #endif // CHROME_SERVICE_CLOUD_PRINT_CLOUD_PRINT_MESSAGE_HANDLER_H_