| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 // need to create a new metafile. The result may be either the passed | 227 // need to create a new metafile. The result may be either the passed |
| 228 // |metafile| or a new one. In either case, the caller owns both |metafile| | 228 // |metafile| or a new one. In either case, the caller owns both |metafile| |
| 229 // and the result. | 229 // and the result. |
| 230 printing::Metafile* RenderPage(const PrintMsg_Print_Params& params, | 230 printing::Metafile* RenderPage(const PrintMsg_Print_Params& params, |
| 231 float* scale_factor, int page_number, | 231 float* scale_factor, int page_number, |
| 232 bool is_preview, WebKit::WebFrame* frame, | 232 bool is_preview, WebKit::WebFrame* frame, |
| 233 printing::Metafile* metafile); | 233 printing::Metafile* metafile); |
| 234 #elif defined(OS_MACOSX) | 234 #elif defined(OS_MACOSX) |
| 235 void RenderPage(const gfx::Size& page_size, const gfx::Rect& content_area, | 235 void RenderPage(const gfx::Size& page_size, const gfx::Rect& content_area, |
| 236 const float& scale_factor, int page_number, | 236 const float& scale_factor, int page_number, |
| 237 WebKit::WebFrame* frame, bool is_preview, | 237 WebKit::WebFrame* frame, printing::Metafile* metafile); |
| 238 printing::Metafile* metafile); | |
| 239 #elif defined(OS_POSIX) | 238 #elif defined(OS_POSIX) |
| 240 bool RenderPages(const PrintMsg_PrintPages_Params& params, | 239 bool RenderPages(const PrintMsg_PrintPages_Params& params, |
| 241 WebKit::WebFrame* frame, const WebKit::WebNode& node, | 240 WebKit::WebFrame* frame, const WebKit::WebNode& node, |
| 242 int* page_count, PrepareFrameAndViewForPrint* prepare, | 241 int* page_count, PrepareFrameAndViewForPrint* prepare, |
| 243 printing::Metafile* metafile); | 242 printing::Metafile* metafile); |
| 244 #endif // defined(OS_WIN) | 243 #endif // defined(OS_WIN) |
| 245 | 244 |
| 246 // Helper methods ----------------------------------------------------------- | 245 // Helper methods ----------------------------------------------------------- |
| 247 | 246 |
| 248 bool CopyAndPrint(WebKit::WebFrame* web_frame); | 247 bool CopyAndPrint(WebKit::WebFrame* web_frame); |
| (...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 | 434 |
| 436 State state_; | 435 State state_; |
| 437 }; | 436 }; |
| 438 | 437 |
| 439 PrintPreviewContext print_preview_context_; | 438 PrintPreviewContext print_preview_context_; |
| 440 | 439 |
| 441 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 440 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 442 }; | 441 }; |
| 443 | 442 |
| 444 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 443 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |