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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 FAIL_PRINT, | 165 FAIL_PRINT, |
166 FAIL_PREVIEW, | 166 FAIL_PREVIEW, |
167 }; | 167 }; |
168 | 168 |
169 // Notification when printing is done - signal tear-down/free resources. | 169 // Notification when printing is done - signal tear-down/free resources. |
170 void DidFinishPrinting(PrintingResult result); | 170 void DidFinishPrinting(PrintingResult result); |
171 | 171 |
172 // Print Settings ----------------------------------------------------------- | 172 // Print Settings ----------------------------------------------------------- |
173 | 173 |
174 // Initialize print page settings with default settings. | 174 // Initialize print page settings with default settings. |
175 bool InitPrintSettings(WebKit::WebFrame* frame, | 175 bool InitPrintSettings(WebKit::WebFrame* frame); |
176 WebKit::WebNode* node, | |
177 bool is_preview); | |
178 | 176 |
179 // Initialize print page settings with default settings and prepare the frame | 177 // Prepare the frame for print. A new PrepareFrameAndViewForPrint is created |
180 // for print. A new PrepareFrameAndViewForPrint is created to fulfill the | 178 // to fulfill the request and is filled into the |prepare| argument. |
181 // request and is filled into the |prepare| argument. | 179 bool PrepareFrame( |
182 bool InitPrintSettingsAndPrepareFrame( | |
183 WebKit::WebFrame* frame, | 180 WebKit::WebFrame* frame, |
184 WebKit::WebNode* node, | 181 WebKit::WebNode* node, |
185 scoped_ptr<PrepareFrameAndViewForPrint>* prepare); | 182 scoped_ptr<PrepareFrameAndViewForPrint>* prepare); |
186 | 183 |
187 // Update the current print settings with new |job_settings|. |job_settings| | 184 // Update the current print settings with new |job_settings|. |job_settings| |
188 // dictionary contains print job details such as printer name, number of | 185 // dictionary contains print job details such as printer name, number of |
189 // copies, page range, etc. | 186 // copies, page range, etc. |
190 bool UpdatePrintSettings(const base::DictionaryValue& job_settings, | 187 bool UpdatePrintSettings(const base::DictionaryValue& job_settings, |
191 bool is_preview); | 188 bool is_preview); |
192 | 189 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 | 429 |
433 State state_; | 430 State state_; |
434 }; | 431 }; |
435 | 432 |
436 PrintPreviewContext print_preview_context_; | 433 PrintPreviewContext print_preview_context_; |
437 | 434 |
438 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 435 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
439 }; | 436 }; |
440 | 437 |
441 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 438 #endif // CHROME_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
OLD | NEW |