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
3 // found in the LICENSE file.
5 #ifndef PPAPI_PROXY_PPP_PRINTING_PROXY_H_
6 #define PPAPI_PROXY_PPP_PRINTING_PROXY_H_
11 #include "ppapi/c/dev/ppp_printing_dev.h"
12 #include "ppapi/proxy/interface_proxy.h"
14 struct PP_PrintPageNumberRange_Dev;
22 class PPP_Printing_Proxy : public InterfaceProxy {
24 PPP_Printing_Proxy(Dispatcher* dispatcher);
25 virtual ~PPP_Printing_Proxy();
27 static const PPP_Printing_Dev* GetProxyInterface();
29 // InterfaceProxy implementation.
30 virtual bool OnMessageReceived(const IPC::Message& msg);
34 void OnPluginMsgQuerySupportedFormats(PP_Instance instance, uint32_t* result);
35 void OnPluginMsgBegin(PP_Instance instance,
36 const std::string& settings_string,
38 void OnPluginMsgPrintPages(
40 const std::vector<PP_PrintPageNumberRange_Dev>& pages,
41 HostResource* result);
42 void OnPluginMsgEnd(PP_Instance instance);
43 void OnPluginMsgIsScalingDisabled(PP_Instance instance, bool* result);
45 // When this proxy is in the plugin side, this value caches the interface
46 // pointer so we don't have to retrieve it from the dispatcher each time.
47 // In the host, this value is always NULL.
48 const PPP_Printing_Dev* ppp_printing_impl_;
50 DISALLOW_COPY_AND_ASSIGN(PPP_Printing_Proxy);
56 #endif // PPAPI_PROXY_PPP_PRINTING_PROXY_H_