| 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 CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
| 6 #define CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 6 #define CHROME_RENDERER_PRINTING_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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 const base::DictionaryValue& passed_job_settings); | 195 const base::DictionaryValue& passed_job_settings); |
| 196 | 196 |
| 197 // Get final print settings from the user. | 197 // Get final print settings from the user. |
| 198 // Return false if the user cancels or on error. | 198 // Return false if the user cancels or on error. |
| 199 bool GetPrintSettingsFromUser(WebKit::WebFrame* frame, | 199 bool GetPrintSettingsFromUser(WebKit::WebFrame* frame, |
| 200 const WebKit::WebNode& node, | 200 const WebKit::WebNode& node, |
| 201 int expected_pages_count); | 201 int expected_pages_count); |
| 202 | 202 |
| 203 // Page Printing / Rendering ------------------------------------------------ | 203 // Page Printing / Rendering ------------------------------------------------ |
| 204 | 204 |
| 205 void OnFramePreparedForPrintPages(); |
| 205 void PrintPages(); | 206 void PrintPages(); |
| 206 bool PrintPagesNative(WebKit::WebFrame* frame, | 207 bool PrintPagesNative(WebKit::WebFrame* frame, |
| 207 const WebKit::WebNode& node, | 208 const WebKit::WebNode& node, |
| 208 int page_count, | 209 int page_count, |
| 209 const gfx::Size& canvas_size); | 210 const gfx::Size& canvas_size); |
| 211 void FinishFramePrinting(); |
| 210 | 212 |
| 211 // Prints the page listed in |params|. | 213 // Prints the page listed in |params|. |
| 212 #if defined(USE_X11) | 214 #if defined(USE_X11) |
| 213 void PrintPageInternal(const PrintMsg_PrintPage_Params& params, | 215 void PrintPageInternal(const PrintMsg_PrintPage_Params& params, |
| 214 const gfx::Size& canvas_size, | 216 const gfx::Size& canvas_size, |
| 215 WebKit::WebFrame* frame, | 217 WebKit::WebFrame* frame, |
| 216 Metafile* metafile); | 218 Metafile* metafile); |
| 217 #else | 219 #else |
| 218 void PrintPageInternal(const PrintMsg_PrintPage_Params& params, | 220 void PrintPageInternal(const PrintMsg_PrintPage_Params& params, |
| 219 const gfx::Size& canvas_size, | 221 const gfx::Size& canvas_size, |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 }; | 457 }; |
| 456 | 458 |
| 457 bool print_node_in_progress_; | 459 bool print_node_in_progress_; |
| 458 PrintPreviewContext print_preview_context_; | 460 PrintPreviewContext print_preview_context_; |
| 459 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 461 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 460 }; | 462 }; |
| 461 | 463 |
| 462 } // namespace printing | 464 } // namespace printing |
| 463 | 465 |
| 464 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ | 466 #endif // CHROME_RENDERER_PRINTING_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |