diff options
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/mock_printer.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/print_web_view_helper_linux.cc | 6 | ||||
-rw-r--r-- | chrome/renderer/print_web_view_helper_mac.mm | 8 | ||||
-rw-r--r-- | chrome/renderer/print_web_view_helper_win.cc | 12 |
4 files changed, 14 insertions, 14 deletions
diff --git a/chrome/renderer/mock_printer.cc b/chrome/renderer/mock_printer.cc index 808524e..982ab80 100644 --- a/chrome/renderer/mock_printer.cc +++ b/chrome/renderer/mock_printer.cc @@ -139,7 +139,7 @@ void MockPrinter::PrintPage(const ViewHostMsg_DidPrintPage_Params& params) { #endif metafile_data.Map(params.data_size); scoped_ptr<printing::NativeMetafile> metafile( - printing::NativeMetafileFactory::CreateMetafile()); + printing::NativeMetafileFactory::Create()); metafile->InitFromData(metafile_data.memory(), params.data_size); printing::Image image(*metafile); MockPrinterPage* page_data = new MockPrinterPage(metafile_data.memory(), diff --git a/chrome/renderer/print_web_view_helper_linux.cc b/chrome/renderer/print_web_view_helper_linux.cc index d9015d6..970b47c 100644 --- a/chrome/renderer/print_web_view_helper_linux.cc +++ b/chrome/renderer/print_web_view_helper_linux.cc @@ -28,7 +28,7 @@ void PrintWebViewHelper::CreatePreviewDocument( // We only can use PDF in the renderer because Cairo needs to create a // temporary file for a PostScript surface. scoped_ptr<printing::NativeMetafile> metafile( - printing::NativeMetafileFactory::CreateMetafile()); + printing::NativeMetafileFactory::Create()); int page_count = 0; if (!RenderPages(params, frame, node, false, &page_count, metafile.get())) @@ -57,7 +57,7 @@ void PrintWebViewHelper::PrintPages(const ViewMsg_PrintPages_Params& params, // We only can use PDF in the renderer because Cairo needs to create a // temporary file for a PostScript surface. scoped_ptr<printing::NativeMetafile> metafile( - printing::NativeMetafileFactory::CreateMetafile()); + printing::NativeMetafileFactory::Create()); int page_count = 0; bool send_expected_page_count = #if defined(OS_CHROMEOS) @@ -189,7 +189,7 @@ bool PrintWebViewHelper::RenderPages(const ViewMsg_PrintPages_Params& params, } } - metafile->Close(); + metafile->FinishDocument(); return true; } diff --git a/chrome/renderer/print_web_view_helper_mac.mm b/chrome/renderer/print_web_view_helper_mac.mm index 64c802d..c75790d 100644 --- a/chrome/renderer/print_web_view_helper_mac.mm +++ b/chrome/renderer/print_web_view_helper_mac.mm @@ -20,7 +20,7 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params, const gfx::Size& canvas_size, WebFrame* frame) { scoped_ptr<printing::NativeMetafile> metafile( - printing::NativeMetafileFactory::CreateMetafile()); + printing::NativeMetafileFactory::Create()); if (!metafile->Init()) return; @@ -31,7 +31,7 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params, gfx::Point origin(0.0f, 0.0f); RenderPage(params.params.printable_size, origin, scale_factor, page_number, frame, metafile.get()); - metafile->Close(); + metafile->FinishDocument(); ViewHostMsg_DidPrintPage_Params page_params; page_params.data_size = metafile->GetDataSize(); @@ -67,7 +67,7 @@ void PrintWebViewHelper::CreatePreviewDocument( return; scoped_ptr<printing::NativeMetafile> metafile( - printing::NativeMetafileFactory::CreateMetafile()); + printing::NativeMetafileFactory::Create()); if (!metafile->Init()) return; @@ -86,7 +86,7 @@ void PrintWebViewHelper::CreatePreviewDocument( static_cast<int>(params.pages[i]), frame, metafile.get()); } } - metafile->Close(); + metafile->FinishDocument(); ViewHostMsg_DidPreviewDocument_Params preview_params; preview_params.data_size = metafile->GetDataSize(); diff --git a/chrome/renderer/print_web_view_helper_win.cc b/chrome/renderer/print_web_view_helper_win.cc index 33ff59b..d4b37db 100644 --- a/chrome/renderer/print_web_view_helper_win.cc +++ b/chrome/renderer/print_web_view_helper_win.cc @@ -73,7 +73,7 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params, // Generate a memory-based metafile. It will use the current screen's DPI. // Each metafile contains a single page. scoped_ptr<printing::NativeMetafile> metafile( - printing::NativeMetafileFactory::CreateMetafile()); + printing::NativeMetafileFactory::Create()); metafile->CreateDc(NULL, NULL); DCHECK(metafile->context()); skia::PlatformDevice::InitializeDC(metafile->context()); @@ -88,7 +88,7 @@ void PrintWebViewHelper::PrintPage(const ViewMsg_PrintPage_Params& params, RenderPage(params.params, &scale_factor, page_number, frame, &metafile); // Close the device context to retrieve the compiled metafile. - if (!metafile->Close()) + if (!metafile->FinishDocument()) NOTREACHED(); // Get the size of the compiled metafile. @@ -141,7 +141,7 @@ void PrintWebViewHelper::CreatePreviewDocument( // EMF with PDF metafile. // http://code.google.com/p/chromium/issues/detail?id=62889 scoped_ptr<printing::NativeMetafile> metafile( - printing::NativeMetafileFactory::CreateMetafile()); + printing::NativeMetafileFactory::Create()); metafile->CreateDc(NULL, NULL); DCHECK(metafile->context()); skia::PlatformDevice::InitializeDC(metafile->context()); @@ -166,7 +166,7 @@ void PrintWebViewHelper::CreatePreviewDocument( } // Close the device context to retrieve the compiled metafile. - if (!metafile->Close()) + if (!metafile->FinishDocument()) NOTREACHED(); // Get the size of the compiled metafile. @@ -276,11 +276,11 @@ void PrintWebViewHelper::RenderPage( static_cast<skia::VectorPlatformDevice*>(canvas.getDevice()); if (platform_device->alpha_blend_used() && !params.supports_alpha_blend) { // Close the device context to retrieve the compiled metafile. - if (!(*metafile)->Close()) + if (!(*metafile)->FinishDocument()) NOTREACHED(); scoped_ptr<printing::NativeMetafile> metafile2( - printing::NativeMetafileFactory::CreateMetafile()); + printing::NativeMetafileFactory::Create()); // Page used alpha blend, but printer doesn't support it. Rewrite the // metafile and flatten out the transparency. HDC bitmap_dc = CreateCompatibleDC(GetDC(NULL)); |