| 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 COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 5 #ifndef COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 6 #define COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 // Initialize print page settings with default settings. | 214 // Initialize print page settings with default settings. |
| 215 // Used only for native printing workflow. | 215 // Used only for native printing workflow. |
| 216 bool InitPrintSettings(bool fit_to_paper_size); | 216 bool InitPrintSettings(bool fit_to_paper_size); |
| 217 | 217 |
| 218 // Calculate number of pages in source document. | 218 // Calculate number of pages in source document. |
| 219 bool CalculateNumberOfPages(blink::WebLocalFrame* frame, | 219 bool CalculateNumberOfPages(blink::WebLocalFrame* frame, |
| 220 const blink::WebNode& node, | 220 const blink::WebNode& node, |
| 221 int* number_of_pages); | 221 int* number_of_pages); |
| 222 | 222 |
| 223 // Set options for print preset from source PDF document. | 223 // Set options for print preset from source PDF document. |
| 224 void SetOptionsFromDocument( | 224 void SetOptionsFromPdfDocument( |
| 225 PrintHostMsg_SetOptionsFromDocument_Params& params); | 225 PrintHostMsg_SetOptionsFromDocument_Params* options); |
| 226 | 226 |
| 227 // Update the current print settings with new |passed_job_settings|. | 227 // Update the current print settings with new |passed_job_settings|. |
| 228 // |passed_job_settings| dictionary contains print job details such as printer | 228 // |passed_job_settings| dictionary contains print job details such as printer |
| 229 // name, number of copies, page range, etc. | 229 // name, number of copies, page range, etc. |
| 230 bool UpdatePrintSettings(blink::WebLocalFrame* frame, | 230 bool UpdatePrintSettings(blink::WebLocalFrame* frame, |
| 231 const blink::WebNode& node, | 231 const blink::WebNode& node, |
| 232 const base::DictionaryValue& passed_job_settings); | 232 const base::DictionaryValue& passed_job_settings); |
| 233 | 233 |
| 234 // Get final print settings from the user. | 234 // Get final print settings from the user. |
| 235 // Return false if the user cancels or on error. | 235 // Return false if the user cancels or on error. |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 501 base::Closure on_stop_loading_closure_; | 501 base::Closure on_stop_loading_closure_; |
| 502 | 502 |
| 503 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; | 503 base::WeakPtrFactory<PrintWebViewHelper> weak_ptr_factory_; |
| 504 | 504 |
| 505 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); | 505 DISALLOW_COPY_AND_ASSIGN(PrintWebViewHelper); |
| 506 }; | 506 }; |
| 507 | 507 |
| 508 } // namespace printing | 508 } // namespace printing |
| 509 | 509 |
| 510 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ | 510 #endif // COMPONENTS_PRINTING_RENDERER_PRINT_WEB_VIEW_HELPER_H_ |
| OLD | NEW |