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

Unified Diff: components/pdf/renderer/pepper_pdf_host.h

Issue 1125113002: Remove the unused parts of PPB_PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pdf-delete-pdf
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/pdf/renderer/pdf_resource_util.cc ('k') | components/pdf/renderer/pepper_pdf_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/pdf/renderer/pepper_pdf_host.h
diff --git a/components/pdf/renderer/pepper_pdf_host.h b/components/pdf/renderer/pepper_pdf_host.h
index e858ee628a804bb4b3bbca1f71dd7df3f93061c7..fe6f33800dc7a6866bbbdbf72055e3bb1203d037 100644
--- a/components/pdf/renderer/pepper_pdf_host.h
+++ b/components/pdf/renderer/pepper_pdf_host.h
@@ -38,11 +38,34 @@ namespace pdf {
class PepperPDFHost : public ppapi::host::ResourceHost {
public:
+ class PrintClient {
+ public:
+ virtual ~PrintClient() {}
+
+ // Returns whether printing is enabled for the plugin instance identified by
+ // |instance_id|.
+ virtual bool IsPrintingEnabled(PP_Instance instance_id) = 0;
+
+ // Invokes the "Print" command for the plugin instance identified by
+ // |instance_id|. Returns whether the "Print" command was issued or not.
+ virtual bool Print(PP_Instance instance_id) = 0;
+ };
+
PepperPDFHost(content::RendererPpapiHost* host,
PP_Instance instance,
PP_Resource resource);
~PepperPDFHost() override;
+ // Invokes the "Print" command for the given instance as if the user right
+ // clicked on it and selected "Print". Returns if the "Print" command was
+ // issued or not.
+ static bool InvokePrintingForInstance(PP_Instance instance);
+
+ // The caller retains the ownership of |print_client|. The client is
+ // allowed to be set only once, and when set, the client must outlive the
+ // PPB_PDF_Impl instance.
+ static void SetPrintClient(PrintClient* print_client);
+
int32_t OnResourceMessageReceived(
const IPC::Message& msg,
ppapi::host::HostMessageContext* context) override;
@@ -62,23 +85,11 @@ class PepperPDFHost : public ppapi::host::ResourceHost {
ppapi::host::HostMessageContext* context);
int32_t OnHostMsgPrint(ppapi::host::HostMessageContext* context);
int32_t OnHostMsgSaveAs(ppapi::host::HostMessageContext* context);
- int32_t OnHostMsgGetResourceImage(ppapi::host::HostMessageContext* context,
- PP_ResourceImage image_id,
- float scale);
int32_t OnHostMsgSetSelectedText(ppapi::host::HostMessageContext* context,
const base::string16& selected_text);
int32_t OnHostMsgSetLinkUnderCursor(ppapi::host::HostMessageContext* context,
const std::string& url);
- bool CreateImageData(PP_Instance instance,
- PP_ImageDataFormat format,
- const PP_Size& size,
- const SkBitmap& pixels_to_write,
- ppapi::HostResource* result,
- PP_ImageDataDesc* out_image_data_desc,
- IPC::PlatformFileForTransit* out_image_handle,
- uint32_t* out_byte_count);
-
content::RendererPpapiHost* host_;
DISALLOW_COPY_AND_ASSIGN(PepperPDFHost);
« no previous file with comments | « components/pdf/renderer/pdf_resource_util.cc ('k') | components/pdf/renderer/pepper_pdf_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698