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 "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 bool CreatePreviewDocument(const PrintMsg_PrintPages_Params& params, | 178 bool CreatePreviewDocument(const PrintMsg_PrintPages_Params& params, |
179 WebKit::WebFrame* frame, | 179 WebKit::WebFrame* frame, |
180 WebKit::WebNode* node); | 180 WebKit::WebNode* node); |
181 | 181 |
182 // Platform specific helper function for rendering page(s) to |metafile|. | 182 // Platform specific helper function for rendering page(s) to |metafile|. |
183 #if defined(OS_WIN) | 183 #if defined(OS_WIN) |
184 void RenderPage(const PrintMsg_Print_Params& params, float* scale_factor, | 184 void RenderPage(const PrintMsg_Print_Params& params, float* scale_factor, |
185 int page_number, bool is_preview, WebKit::WebFrame* frame, | 185 int page_number, bool is_preview, WebKit::WebFrame* frame, |
186 scoped_ptr<printing::Metafile>* metafile); | 186 scoped_ptr<printing::Metafile>* metafile); |
187 #elif defined(OS_MACOSX) | 187 #elif defined(OS_MACOSX) |
188 void RenderPage(const gfx::Size& page_size, const gfx::Point& content_origin, | 188 void RenderPage(const gfx::Size& page_size, const gfx::Rect& page_size, |
189 const float& scale_factor, int page_number, | 189 const float& scale_factor, int page_number, |
190 WebKit::WebFrame* frame, printing::Metafile* metafile); | 190 WebKit::WebFrame* frame, printing::Metafile* metafile); |
191 #elif defined(OS_POSIX) | 191 #elif defined(OS_POSIX) |
192 bool RenderPages(const PrintMsg_PrintPages_Params& params, | 192 bool RenderPages(const PrintMsg_PrintPages_Params& params, |
193 WebKit::WebFrame* frame, | 193 WebKit::WebFrame* frame, |
194 WebKit::WebNode* node, | 194 WebKit::WebNode* node, |
195 bool send_expected_page_count, | 195 bool send_expected_page_count, |
196 int* page_count, | 196 int* page_count, |
197 printing::Metafile* metafile); | 197 printing::Metafile* metafile); |
198 #endif // defined(OS_WIN) | 198 #endif // defined(OS_WIN) |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 244 |
245 scoped_ptr<PrintMsg_PrintPages_Params> print_pages_params_; | 245 scoped_ptr<PrintMsg_PrintPages_Params> print_pages_params_; |
246 base::Time last_cancelled_script_print_; | 246 base::Time last_cancelled_script_print_; |
247 int user_cancelled_scripted_print_count_; | 247 int user_cancelled_scripted_print_count_; |
248 bool is_preview_; | 248 bool is_preview_; |
249 | 249 |
250 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 250 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
251 }; | 251 }; |
252 | 252 |
253 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 253 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |