Home | History | Annotate | Download | only in common
      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
      3 // found in the LICENSE file.
      4 
      5 // Multiply-included message file, no traditional include guard.
      6 #include <string>
      7 #include <vector>
      8 
      9 #include "base/values.h"
     10 #include "chrome/common/cloud_print/cloud_print_proxy_info.h"
     11 #include "ipc/ipc_channel_handle.h"
     12 #include "ipc/ipc_message_macros.h"
     13 
     14 #define IPC_MESSAGE_START ServiceMsgStart
     15 
     16 IPC_STRUCT_TRAITS_BEGIN(cloud_print::CloudPrintProxyInfo)
     17   IPC_STRUCT_TRAITS_MEMBER(enabled)
     18   IPC_STRUCT_TRAITS_MEMBER(email)
     19   IPC_STRUCT_TRAITS_MEMBER(proxy_id)
     20 IPC_STRUCT_TRAITS_END()
     21 
     22 // Tell the service process to enable the cloud proxy passing in the OAuth2
     23 // auth code of a robot account.
     24 IPC_MESSAGE_CONTROL4(ServiceMsg_EnableCloudPrintProxyWithRobot,
     25                      std::string /* robot_auth_code */,
     26                      std::string /* robot_email */,
     27                      std::string /* user_email */,
     28                      base::DictionaryValue /* user_settings */)
     29 
     30 // Tell the service process to disable the cloud proxy.
     31 IPC_MESSAGE_CONTROL0(ServiceMsg_DisableCloudPrintProxy)
     32 
     33 // Requests a message back on the current status of the cloud print proxy
     34 // (whether it is enabled, the email address and the proxy id).
     35 IPC_MESSAGE_CONTROL0(ServiceMsg_GetCloudPrintProxyInfo)
     36 
     37 // Requests a message back with serialized UMA histograms.
     38 IPC_MESSAGE_CONTROL0(ServiceMsg_GetHistograms)
     39 
     40 // Requests a message back with all available printers.
     41 IPC_MESSAGE_CONTROL0(ServiceMsg_GetPrinters)
     42 
     43 // Tell the service process to shutdown.
     44 IPC_MESSAGE_CONTROL0(ServiceMsg_Shutdown)
     45 
     46 // Tell the service process that an update is available.
     47 IPC_MESSAGE_CONTROL0(ServiceMsg_UpdateAvailable)
     48 
     49 //-----------------------------------------------------------------------------
     50 // Service process host messages:
     51 // These are messages from the service process to the browser.
     52 // Sent as a response to a request for cloud print proxy info
     53 IPC_MESSAGE_CONTROL1(ServiceHostMsg_CloudPrintProxy_Info,
     54                      cloud_print::CloudPrintProxyInfo /* proxy info */)
     55 
     56 // Sent as a response to ServiceMsg_GetHistograms.
     57 IPC_MESSAGE_CONTROL1(ServiceHostMsg_Histograms,
     58                      std::vector<std::string> /* pickled_histograms */)
     59 
     60 // Sent as a response to ServiceMsg_GetPrinters.
     61 IPC_MESSAGE_CONTROL1(ServiceHostMsg_Printers,
     62                      std::vector<std::string> /* printers */)
     63