blob: 0ef5c770c9bd2ab70f88f4fad31cae4a7e243308 [file] [log] [blame]
[email protected]e9cb0b792012-09-07 07:11:061// 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
avie029c4132015-12-23 06:45:228#include <stdint.h>
9
10#include "base/macros.h"
[email protected]e9cb0b792012-09-07 07:11:0611#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
17namespace ppapi {
18namespace proxy {
19
20class 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);
nicke4784432015-04-23 14:01:4826 ~PrintingResource() override;
[email protected]e9cb0b792012-09-07 07:11:0627
28 // Resource overrides.
nicke4784432015-04-23 14:01:4829 thunk::PPB_Printing_API* AsPPB_Printing_API() override;
[email protected]e9cb0b792012-09-07 07:11:0630
31 // PPB_Printing_API.
nicke4784432015-04-23 14:01:4832 int32_t GetDefaultPrintSettings(
[email protected]e9cb0b792012-09-07 07:11:0633 PP_PrintSettings_Dev* print_settings,
mostynb699af3c2014-10-06 18:03:3434 scoped_refptr<TrackedCallback> callback) override;
[email protected]e9cb0b792012-09-07 07:11:0635
36 private:
[email protected]e9cb0b792012-09-07 07:11:0637 void OnPluginMsgGetDefaultPrintSettingsReply(
[email protected]e1f5c9b2012-10-04 00:07:4438 PP_PrintSettings_Dev* settings_out,
39 scoped_refptr<TrackedCallback> callback,
[email protected]e9cb0b792012-09-07 07:11:0640 const ResourceMessageReplyParams& params,
[email protected]e1f5c9b2012-10-04 00:07:4441 const PP_PrintSettings_Dev& settings);
[email protected]e9cb0b792012-09-07 07:11:0642
43 DISALLOW_COPY_AND_ASSIGN(PrintingResource);
44};
45
46} // namespace proxy
47} // namespace ppapi
48
49#endif // PPAPI_PROXY_PRINTING_RESOURCE_H_