Chromium Code Reviews| 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_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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 const printing::PageSizeMargins& page_layout_in_points, | 153 const printing::PageSizeMargins& page_layout_in_points, |
| 154 gfx::Size* page_size, | 154 gfx::Size* page_size, |
| 155 gfx::Rect* content_area); | 155 gfx::Rect* content_area); |
| 156 | 156 |
| 157 // Update |ignore_css_margins_| based on settings. | 157 // Update |ignore_css_margins_| based on settings. |
| 158 void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings); | 158 void UpdateFrameMarginsCssInfo(const base::DictionaryValue& settings); |
| 159 | 159 |
| 160 // Returns true if the current destination printer is PRINT_TO_PDF. | 160 // Returns true if the current destination printer is PRINT_TO_PDF. |
| 161 bool IsPrintToPdfRequested(const base::DictionaryValue& settings); | 161 bool IsPrintToPdfRequested(const base::DictionaryValue& settings); |
| 162 | 162 |
| 163 // Updates |settings| fit to page information based on |job_settings| and | |
|
Lei Zhang
2012/04/26 22:52:23
I think this comment can use some improvements to
kmadhusu
2012/04/27 01:28:58
As we discussed, I have listed the details and cha
| |
| 164 // |settings|. | |
| 165 void UpdateFitToPageInfo(WebKit::WebFrame* frame, | |
| 166 const WebKit::WebNode& node, | |
| 167 const base::DictionaryValue& job_settings, | |
| 168 PrintMsg_PrintPages_Params* settings); | |
| 169 | |
| 163 // Initiate print preview. | 170 // Initiate print preview. |
| 164 void OnInitiatePrintPreview(); | 171 void OnInitiatePrintPreview(); |
| 165 | 172 |
| 166 // Start the process of generating a print preview using |settings|. | 173 // Start the process of generating a print preview using |settings|. |
| 167 void OnPrintPreview(const base::DictionaryValue& settings); | 174 void OnPrintPreview(const base::DictionaryValue& settings); |
| 168 | 175 |
| 169 // Initialize the print preview document. | 176 // Initialize the print preview document. |
| 170 bool CreatePreviewDocument(); | 177 bool CreatePreviewDocument(); |
| 171 | 178 |
| 172 // Renders a print preview page. |page_number| is 0-based. | 179 // Renders a print preview page. |page_number| is 0-based. |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 467 enum PrintPreviewErrorBuckets error_; | 474 enum PrintPreviewErrorBuckets error_; |
| 468 | 475 |
| 469 State state_; | 476 State state_; |
| 470 }; | 477 }; |
| 471 | 478 |
| 472 PrintPreviewContext print_preview_context_; | 479 PrintPreviewContext print_preview_context_; |
| 473 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 480 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 474 }; | 481 }; |
| 475 | 482 |
| 476 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 483 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |