| Index: content/renderer/pepper/pepper_plugin_instance_impl.h
|
| diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h
|
| index dc08cfff6c7d0e8a085e2f1a3ec9db7d9faa366a..213c81262a0e64b0c91b9fb70f0a1ddc6e98c3c0 100644
|
| --- a/content/renderer/pepper/pepper_plugin_instance_impl.h
|
| +++ b/content/renderer/pepper/pepper_plugin_instance_impl.h
|
| @@ -98,6 +98,10 @@ struct PPP_Instance_Combined;
|
| class ScopedPPVar;
|
| }
|
|
|
| +namespace printing {
|
| +class PdfMetafileSkia;
|
| +}
|
| +
|
| namespace content {
|
|
|
| class ContentDecryptorDelegate;
|
| @@ -645,7 +649,8 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
|
| // best format to use. Returns false if the plugin does not support any
|
| // print format that we can handle (we can handle only PDF).
|
| bool GetPreferredPrintOutputFormat(PP_PrintOutputFormat_Dev* format);
|
| - bool PrintPDFOutput(PP_Resource print_output, blink::WebCanvas* canvas);
|
| + bool PrintPDFOutput(PP_Resource print_output,
|
| + printing::PdfMetafileSkia* metafile);
|
|
|
| // Updates the layer for compositing. This creates a layer and attaches to the
|
| // container if:
|
| @@ -661,7 +666,7 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
|
| // Internal helper function for PrintPage().
|
| void PrintPageHelper(PP_PrintPageNumberRange_Dev* page_ranges,
|
| int num_ranges,
|
| - blink::WebCanvas* canvas);
|
| + printing::PdfMetafileSkia* metafile);
|
|
|
| void DoSetCursor(blink::WebCursorInfo* cursor);
|
|
|
| @@ -835,12 +840,12 @@ class CONTENT_EXPORT PepperPluginInstanceImpl
|
| // and Win, the entire document goes into one metafile. However, when users
|
| // print only a subset of all the pages, it is impossible to know if a call
|
| // to PrintPage() is the last call. Thus in PrintPage(), just store the page
|
| - // number in |ranges_|. The hack is in PrintEnd(), where a valid |canvas_|
|
| + // number in |ranges_|. The hack is in PrintEnd(), where a valid |metafile_|
|
| // is preserved in PrintWebViewHelper::PrintPages. This makes it possible
|
| // to generate the entire PDF given the variables below:
|
| //
|
| - // The most recently used WebCanvas, guaranteed to be valid.
|
| - sk_sp<blink::WebCanvas> canvas_;
|
| + // The most recently used metafile_, guaranteed to be valid.
|
| + printing::PdfMetafileSkia* metafile_;
|
| // An array of page ranges.
|
| std::vector<PP_PrintPageNumberRange_Dev> ranges_;
|
|
|
|
|