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

Side by Side Diff: chrome/renderer/print_web_view_helper.h

Issue 11359020: Print headers and footers with WebKit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
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 CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 5 #ifndef CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 6 #define CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 WebKit::WebFrame* frame, bool is_preview, 285 WebKit::WebFrame* frame, bool is_preview,
286 printing::Metafile* metafile, gfx::Size* page_size, 286 printing::Metafile* metafile, gfx::Size* page_size,
287 gfx::Rect* content_rect); 287 gfx::Rect* content_rect);
288 #elif defined(OS_POSIX) 288 #elif defined(OS_POSIX)
289 bool RenderPages(const PrintMsg_PrintPages_Params& params, 289 bool RenderPages(const PrintMsg_PrintPages_Params& params,
290 WebKit::WebFrame* frame, const WebKit::WebNode& node, 290 WebKit::WebFrame* frame, const WebKit::WebNode& node,
291 int* page_count, PrepareFrameAndViewForPrint* prepare, 291 int* page_count, PrepareFrameAndViewForPrint* prepare,
292 printing::Metafile* metafile); 292 printing::Metafile* metafile);
293 #endif // defined(OS_WIN) 293 #endif // defined(OS_WIN)
294 294
295 static float RenderPageContent(WebKit::WebFrame* frame,
296 int page_number,
297 const gfx::Rect& canvas_area,
298 const gfx::Rect& content_area,
299 double scale_factor,
300 WebKit::WebCanvas* canvas);
301
295 // Helper methods ----------------------------------------------------------- 302 // Helper methods -----------------------------------------------------------
296 303
297 bool CopyAndPrint(WebKit::WebFrame* web_frame); 304 bool CopyAndPrint(WebKit::WebFrame* web_frame);
298 305
299 bool CopyMetafileDataToSharedMem(printing::Metafile* metafile, 306 bool CopyMetafileDataToSharedMem(printing::Metafile* metafile,
300 base::SharedMemoryHandle* shared_mem_handle); 307 base::SharedMemoryHandle* shared_mem_handle);
301 308
302 // Helper method to get page layout in points and fit to page if needed. 309 // Helper method to get page layout in points and fit to page if needed.
303 static void ComputePageLayoutInPointsForCss( 310 static void ComputePageLayoutInPointsForCss(
304 WebKit::WebFrame* frame, 311 WebKit::WebFrame* frame,
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 enum PrintPreviewErrorBuckets error_; 493 enum PrintPreviewErrorBuckets error_;
487 494
488 State state_; 495 State state_;
489 }; 496 };
490 497
491 PrintPreviewContext print_preview_context_; 498 PrintPreviewContext print_preview_context_;
492 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); 499 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper);
493 }; 500 };
494 501
495 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ 502 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698