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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 // Returns true if the current destination printer is PRINT_TO_PDF. | 158 // Returns true if the current destination printer is PRINT_TO_PDF. |
159 bool IsPrintToPdfRequested(const base::DictionaryValue& settings); | 159 bool IsPrintToPdfRequested(const base::DictionaryValue& settings); |
160 | 160 |
161 // Initiate print preview. | 161 // Initiate print preview. |
162 void OnInitiatePrintPreview(); | 162 void OnInitiatePrintPreview(); |
163 | 163 |
164 // Start the process of generating a print preview using |settings|. | 164 // Start the process of generating a print preview using |settings|. |
165 void OnPrintPreview(const base::DictionaryValue& settings); | 165 void OnPrintPreview(const base::DictionaryValue& settings); |
166 | 166 |
167 // Initialize the print preview document. | 167 // Initialize the print preview document. |
168 bool CreatePreviewDocument(); | 168 bool CreatePreviewDocument(int margins_type); |
169 | 169 |
170 // Renders a print preview page. |page_number| is 0-based. | 170 // Renders a print preview page. |page_number| is 0-based. |
171 // Returns true if print preview should continue, false on failure. | 171 // Returns true if print preview should continue, false on failure. |
172 bool RenderPreviewPage(int page_number); | 172 bool RenderPreviewPage(int page_number); |
173 | 173 |
174 // Finalize the print ready preview document. | 174 // Finalize the print ready preview document. |
175 bool FinalizePrintReadyDocument(); | 175 bool FinalizePrintReadyDocument(); |
176 | 176 |
177 // Print / preview the node under the context menu. | 177 // Print / preview the node under the context menu. |
178 void OnPrintNodeUnderContextMenu(); | 178 void OnPrintNodeUnderContextMenu(); |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 | 463 |
464 State state_; | 464 State state_; |
465 }; | 465 }; |
466 | 466 |
467 PrintPreviewContext print_preview_context_; | 467 PrintPreviewContext print_preview_context_; |
468 | 468 |
469 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 469 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
470 }; | 470 }; |
471 | 471 |
472 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 472 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |