[email protected] | e9cb0b79 | 2012-09-07 07:11:06 | [diff] [blame] | 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_PRINTING_RESOURCE_H_ | ||||
6 | #define PPAPI_PROXY_PRINTING_RESOURCE_H_ | ||||
7 | |||||
avi | e029c413 | 2015-12-23 06:45:22 | [diff] [blame] | 8 | #include <stdint.h> |
9 | |||||
10 | #include "base/macros.h" | ||||
[email protected] | e9cb0b79 | 2012-09-07 07:11:06 | [diff] [blame] | 11 | #include "ppapi/proxy/connection.h" |
12 | #include "ppapi/proxy/plugin_resource.h" | ||||
13 | #include "ppapi/proxy/ppapi_proxy_export.h" | ||||
14 | #include "ppapi/shared_impl/tracked_callback.h" | ||||
15 | #include "ppapi/thunk/ppb_printing_api.h" | ||||
16 | |||||
17 | namespace ppapi { | ||||
18 | namespace proxy { | ||||
19 | |||||
20 | class PPAPI_PROXY_EXPORT PrintingResource | ||||
21 | : public PluginResource, | ||||
22 | public NON_EXPORTED_BASE(thunk::PPB_Printing_API) { | ||||
23 | public: | ||||
24 | PrintingResource(Connection connection, | ||||
25 | PP_Instance instance); | ||||
nick | e478443 | 2015-04-23 14:01:48 | [diff] [blame] | 26 | ~PrintingResource() override; |
[email protected] | e9cb0b79 | 2012-09-07 07:11:06 | [diff] [blame] | 27 | |
28 | // Resource overrides. | ||||
nick | e478443 | 2015-04-23 14:01:48 | [diff] [blame] | 29 | thunk::PPB_Printing_API* AsPPB_Printing_API() override; |
[email protected] | e9cb0b79 | 2012-09-07 07:11:06 | [diff] [blame] | 30 | |
31 | // PPB_Printing_API. | ||||
nick | e478443 | 2015-04-23 14:01:48 | [diff] [blame] | 32 | int32_t GetDefaultPrintSettings( |
[email protected] | e9cb0b79 | 2012-09-07 07:11:06 | [diff] [blame] | 33 | PP_PrintSettings_Dev* print_settings, |
mostynb | 699af3c | 2014-10-06 18:03:34 | [diff] [blame] | 34 | scoped_refptr<TrackedCallback> callback) override; |
[email protected] | e9cb0b79 | 2012-09-07 07:11:06 | [diff] [blame] | 35 | |
36 | private: | ||||
[email protected] | e9cb0b79 | 2012-09-07 07:11:06 | [diff] [blame] | 37 | void OnPluginMsgGetDefaultPrintSettingsReply( |
[email protected] | e1f5c9b | 2012-10-04 00:07:44 | [diff] [blame] | 38 | PP_PrintSettings_Dev* settings_out, |
39 | scoped_refptr<TrackedCallback> callback, | ||||
[email protected] | e9cb0b79 | 2012-09-07 07:11:06 | [diff] [blame] | 40 | const ResourceMessageReplyParams& params, |
[email protected] | e1f5c9b | 2012-10-04 00:07:44 | [diff] [blame] | 41 | const PP_PrintSettings_Dev& settings); |
[email protected] | e9cb0b79 | 2012-09-07 07:11:06 | [diff] [blame] | 42 | |
43 | DISALLOW_COPY_AND_ASSIGN(PrintingResource); | ||||
44 | }; | ||||
45 | |||||
46 | } // namespace proxy | ||||
47 | } // namespace ppapi | ||||
48 | |||||
49 | #endif // PPAPI_PROXY_PRINTING_RESOURCE_H_ |