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

Side by Side Diff: components/printing/renderer/print_web_view_helper.h

Issue 1553643002: Unify some platform-specific methods for PrintWebViewHelper. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@printcros
Patch Set: rebase Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 void OnFramePreparedForPrintPages(); 261 void OnFramePreparedForPrintPages();
262 void PrintPages(); 262 void PrintPages();
263 bool PrintPagesNative(blink::WebFrame* frame, int page_count); 263 bool PrintPagesNative(blink::WebFrame* frame, int page_count);
264 void FinishFramePrinting(); 264 void FinishFramePrinting();
265 // Render the frame for printing. 265 // Render the frame for printing.
266 bool RenderPagesForPrint(blink::WebLocalFrame* frame, 266 bool RenderPagesForPrint(blink::WebLocalFrame* frame,
267 const blink::WebNode& node); 267 const blink::WebNode& node);
268 #endif // defined(ENABLE_BASIC_PRINTING) 268 #endif // defined(ENABLE_BASIC_PRINTING)
269 269
270 // Prints the page listed in |params|. 270 // Prints the page listed in |params|.
271 #if defined(OS_LINUX) || defined(OS_ANDROID) 271 #if defined(OS_MACOSX)
272 void PrintPageInternal(const PrintMsg_PrintPage_Params& params, 272 void PrintPageInternal(const PrintMsg_PrintPage_Params& params,
273 blink::WebFrame* frame, 273 blink::WebFrame* frame);
274 PdfMetafileSkia* metafile); 274 #else
275 #elif defined(OS_WIN)
276 void PrintPageInternal(const PrintMsg_PrintPage_Params& params, 275 void PrintPageInternal(const PrintMsg_PrintPage_Params& params,
277 blink::WebFrame* frame, 276 blink::WebFrame* frame,
278 PdfMetafileSkia* metafile, 277 PdfMetafileSkia* metafile,
279 gfx::Size* page_size_in_dpi, 278 gfx::Size* page_size_in_dpi,
280 gfx::Rect* content_area_in_dpi); 279 gfx::Rect* content_area_in_dpi);
281 #else 280 #endif // defined(OS_MACOSX)
282 void PrintPageInternal(const PrintMsg_PrintPage_Params& params,
283 blink::WebFrame* frame);
284 #endif
285 281
286 // Platform specific helper function for rendering page(s) to |metafile|. 282 // Platform specific helper function for rendering page(s) to |metafile|.
287 #if defined(OS_MACOSX) 283 #if defined(OS_MACOSX)
288 void RenderPage(const PrintMsg_Print_Params& params, 284 void RenderPage(const PrintMsg_Print_Params& params,
289 int page_number, 285 int page_number,
290 blink::WebFrame* frame, 286 blink::WebFrame* frame,
291 bool is_preview, 287 bool is_preview,
292 PdfMetafileSkia* metafile, 288 PdfMetafileSkia* metafile,
293 gfx::Size* page_size, 289 gfx::Size* page_size,
294 gfx::Rect* content_rect); 290 gfx::Rect* content_rect);
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 base::Closure on_stop_loading_closure_; 524 base::Closure on_stop_loading_closure_;
529 525
530 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; 526 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_;
531 527
532 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 528 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
533 }; 529 };
534 530
535 } // namespace printing 531 } // namespace printing
536 532
537 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 533 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW
« no previous file with comments | « no previous file | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698