Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: ppapi/proxy/ppp_printing_proxy.h

Issue 9455083: Proxy the PPP_Printing interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppp_printing_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef PPAPI_PROXY_PPP_PRINTING_PROXY_H_
6 #define PPAPI_PROXY_PPP_PRINTING_PROXY_H_
7
8 #include <vector>
9
10 #include "ppapi/c/dev/ppp_printing_dev.h"
11 #include "ppapi/proxy/interface_proxy.h"
12
13 struct PP_PrintPageNumberRange_Dev;
14
15 namespace ppapi {
16
17 class HostResource;
18
19 namespace proxy {
20
21 class PPP_Printing_Proxy : public InterfaceProxy {
22 public:
23 PPP_Printing_Proxy(Dispatcher* dispatcher);
24 virtual ~PPP_Printing_Proxy();
25
26 static const PPP_Printing_Dev* GetProxyInterface();
27
28 // InterfaceProxy implementation.
29 virtual bool OnMessageReceived(const IPC::Message& msg);
30
31 private:
32 // Message handlers.
33 void OnPluginMsgQuerySupportedFormats(PP_Instance instance, uint32_t* result);
34 void OnPluginMsgBegin(PP_Instance instance,
35 const std::string& settings_string,
36 int32_t* result);
37 void OnPluginMsgPrintPages(
38 PP_Instance instance,
39 const std::vector<PP_PrintPageNumberRange_Dev>& pages,
40 HostResource* result);
41 void OnPluginMsgEnd(PP_Instance instance);
42 void OnPluginMsgIsScalingDisabled(PP_Instance instance, bool* result);
43
44 // When this proxy is in the plugin side, this value caches the interface
45 // pointer so we don't have to retrieve it from the dispatcher each time.
46 // In the host, this value is always NULL.
47 const PPP_Printing_Dev* ppp_printing_impl_;
48
49 DISALLOW_COPY_AND_ASSIGN(PPP_Printing_Proxy);
50 };
51
52 } // namespace proxy
53 } // namespace ppapi
54
55 #endif // PPAPI_PROXY_PPP_PRINTING_PROXY_H_
56
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/proxy/ppp_printing_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698