| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 void FinishFramePrinting(); | 286 void FinishFramePrinting(); |
| 287 // Render the frame for printing. | 287 // Render the frame for printing. |
| 288 bool RenderPagesForPrint(blink::WebLocalFrame* frame, | 288 bool RenderPagesForPrint(blink::WebLocalFrame* frame, |
| 289 const blink::WebNode& node); | 289 const blink::WebNode& node); |
| 290 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) | 290 #endif // BUILDFLAG(ENABLE_BASIC_PRINTING) |
| 291 | 291 |
| 292 // Prints the page listed in |params|. | 292 // Prints the page listed in |params|. |
| 293 #if defined(OS_MACOSX) | 293 #if defined(OS_MACOSX) |
| 294 void PrintPagesInternal(const PrintMsg_Print_Params& params, | 294 void PrintPagesInternal(const PrintMsg_Print_Params& params, |
| 295 const std::vector<int>& printed_pages, | 295 const std::vector<int>& printed_pages, |
| 296 int page_count, |
| 296 blink::WebLocalFrame* frame); | 297 blink::WebLocalFrame* frame); |
| 297 #else | 298 #else |
| 298 void PrintPageInternal(const PrintMsg_Print_Params& params, | 299 void PrintPageInternal(const PrintMsg_Print_Params& params, |
| 299 int page_number, | 300 int page_number, |
| 301 int page_count, |
| 300 blink::WebLocalFrame* frame, | 302 blink::WebLocalFrame* frame, |
| 301 PdfMetafileSkia* metafile, | 303 PdfMetafileSkia* metafile, |
| 302 gfx::Size* page_size_in_dpi, | 304 gfx::Size* page_size_in_dpi, |
| 303 gfx::Rect* content_area_in_dpi, | 305 gfx::Rect* content_area_in_dpi, |
| 304 gfx::Rect* printable_area_in_dpi); | 306 gfx::Rect* printable_area_in_dpi); |
| 305 #endif // defined(OS_MACOSX) | 307 #endif // defined(OS_MACOSX) |
| 306 | 308 |
| 307 // Platform specific helper function for rendering page(s) to |metafile|. | 309 // Platform specific helper function for rendering page(s) to |metafile|. |
| 308 #if defined(OS_MACOSX) | 310 #if defined(OS_MACOSX) |
| 309 void RenderPage(const PrintMsg_Print_Params& params, | 311 void RenderPage(const PrintMsg_Print_Params& params, |
| 310 int page_number, | 312 int page_number, |
| 313 int page_count, |
| 311 blink::WebLocalFrame* frame, | 314 blink::WebLocalFrame* frame, |
| 312 bool is_preview, | 315 bool is_preview, |
| 313 PdfMetafileSkia* metafile, | 316 PdfMetafileSkia* metafile, |
| 314 gfx::Size* page_size, | 317 gfx::Size* page_size, |
| 315 gfx::Rect* content_rect); | 318 gfx::Rect* content_rect); |
| 316 #endif // defined(OS_MACOSX) | 319 #endif // defined(OS_MACOSX) |
| 317 | 320 |
| 318 // Renders page contents from |frame| to |content_area| of |canvas|. | 321 // Renders page contents from |frame| to |content_area| of |canvas|. |
| 319 // |page_number| is zero-based. | 322 // |page_number| is zero-based. |
| 320 // When method is called, canvas should be setup to draw to |canvas_area| | 323 // When method is called, canvas should be setup to draw to |canvas_area| |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 base::Closure on_stop_loading_closure_; | 552 base::Closure on_stop_loading_closure_; |
| 550 | 553 |
| 551 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; | 554 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; |
| 552 | 555 |
| 553 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 556 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 554 }; | 557 }; |
| 555 | 558 |
| 556 } // namespace printing | 559 } // namespace printing |
| 557 | 560 |
| 558 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 561 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |