root/ppapi/proxy/printing_resource.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef PPAPI_PROXY_PRINTING_RESOURCE_H_
#define PPAPI_PROXY_PRINTING_RESOURCE_H_

#include "ppapi/proxy/connection.h"
#include "ppapi/proxy/plugin_resource.h"
#include "ppapi/proxy/ppapi_proxy_export.h"
#include "ppapi/shared_impl/tracked_callback.h"
#include "ppapi/thunk/ppb_printing_api.h"

namespace ppapi {
namespace proxy {

class PPAPI_PROXY_EXPORT PrintingResource
    : public PluginResource,
      public NON_EXPORTED_BASE(thunk::PPB_Printing_API) {
 public:
  PrintingResource(Connection connection,
                   PP_Instance instance);
  virtual ~PrintingResource();

  // Resource overrides.
  virtual thunk::PPB_Printing_API* AsPPB_Printing_API() OVERRIDE;

  // PPB_Printing_API.
  virtual int32_t GetDefaultPrintSettings(
      PP_PrintSettings_Dev* print_settings,
      scoped_refptr<TrackedCallback> callback) OVERRIDE;

 private:
  void OnPluginMsgGetDefaultPrintSettingsReply(
      PP_PrintSettings_Dev* settings_out,
      scoped_refptr<TrackedCallback> callback,
      const ResourceMessageReplyParams& params,
      const PP_PrintSettings_Dev& settings);

  DISALLOW_COPY_AND_ASSIGN(PrintingResource);
};

}  // namespace proxy
}  // namespace ppapi

#endif  // PPAPI_PROXY_PRINTING_RESOURCE_H_

/* [<][>][^][v][top][bottom][index][help] */