Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / service / cloud_print / cloud_print_message_handler.h
blob1a1cb1341953609a455f37424b71c0095cc71fb3
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_
8 #include <string>
10 #include "base/macros.h"
11 #include "chrome/service/cloud_print/cloud_print_proxy.h"
12 #include "chrome/service/service_ipc_server.h"
14 namespace base {
15 class DictionaryValue;
18 namespace IPC {
19 class Message;
20 class Sender;
23 namespace cloud_print {
25 // Handles IPC messages for Cloud Print. Lives on the main thread.
26 class CloudPrintMessageHandler : public ServiceIPCServer::MessageHandler {
27 public:
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;
35 private:
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();
43 void OnGetPrinters();
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_