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 <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 FAIL_PRINT, | 160 FAIL_PRINT, |
161 FAIL_PREVIEW, | 161 FAIL_PREVIEW, |
162 }; | 162 }; |
163 | 163 |
164 // Notification when printing is done - signal tear-down/free resources. | 164 // Notification when printing is done - signal tear-down/free resources. |
165 void DidFinishPrinting(PrintingResult result); | 165 void DidFinishPrinting(PrintingResult result); |
166 | 166 |
167 // Print Settings ----------------------------------------------------------- | 167 // Print Settings ----------------------------------------------------------- |
168 | 168 |
169 // Initialize print page settings with default settings. | 169 // Initialize print page settings with default settings. |
170 bool InitPrintSettings(WebKit::WebFrame* frame, WebKit::WebNode* node); | 170 bool InitPrintSettings(WebKit::WebFrame* frame, |
| 171 WebKit::WebNode* node, |
| 172 bool is_preview); |
171 | 173 |
172 // Initialize print page settings with default settings and prepare the frame | 174 // Initialize print page settings with default settings and prepare the frame |
173 // for print. A new PrepareFrameAndViewForPrint is created to fulfill the | 175 // for print. A new PrepareFrameAndViewForPrint is created to fulfill the |
174 // request and is filled into the |prepare| argument. | 176 // request and is filled into the |prepare| argument. |
175 bool InitPrintSettingsAndPrepareFrame( | 177 bool InitPrintSettingsAndPrepareFrame( |
176 WebKit::WebFrame* frame, | 178 WebKit::WebFrame* frame, |
177 WebKit::WebNode* node, | 179 WebKit::WebNode* node, |
178 scoped_ptr<PrepareFrameAndViewForPrint>* prepare); | 180 scoped_ptr<PrepareFrameAndViewForPrint>* prepare); |
179 | 181 |
180 // Update the current print settings with new |job_settings|. |job_settings| | 182 // Update the current print settings with new |job_settings|. |job_settings| |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 | 398 |
397 State state_; | 399 State state_; |
398 }; | 400 }; |
399 | 401 |
400 PrintPreviewContext print_preview_context_; | 402 PrintPreviewContext print_preview_context_; |
401 | 403 |
402 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 404 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
403 }; | 405 }; |
404 | 406 |
405 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 407 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |