1 // Copyright 2014 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 COMPONENT_PDF_RENDERER_PPB_PDF_IMPL_H_
6 #define COMPONENT_PDF_RENDERER_PPB_PDF_IMPL_H_
8 #include "ppapi/c/pp_instance.h"
18 virtual ~PrintClient() {}
20 // Returns whether printing is enabled for the plugin instance identified by
22 virtual bool IsPrintingEnabled(PP_Instance instance_id
) = 0;
24 // Invokes the "Print" command for the plugin instance identified by
25 // |instance_id|. Returns whether the "Print" command was issued or not.
26 virtual bool Print(PP_Instance instance_id
) = 0;
29 // Returns a pointer to the interface implementing PPB_PDF that is exposed
31 static const PPB_PDF
* GetInterface();
33 // Invokes the "Print" command for the given instance as if the user right
34 // clicked on it and selected "Print". Returns if the "Print" command was
36 static bool InvokePrintingForInstance(PP_Instance instance
);
38 // The caller retains the ownership of |print_client|. The client is
39 // allowed to be set only once, and when set, the client must outlive the
40 // PPB_PDF_Impl instance.
41 static void SetPrintClient(PrintClient
* print_client
);
46 #endif // COMPONENT_PDF_RENDERER_PPB_PDF_IMPL_H_