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_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ |
| 6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 38 PrintJobWorker(int render_process_id, | 38 PrintJobWorker(int render_process_id, |
| 39 int render_view_id, | 39 int render_view_id, |
| 40 PrintJobWorkerOwner* owner); | 40 PrintJobWorkerOwner* owner); |
| 41 virtual ~PrintJobWorker(); | 41 virtual ~PrintJobWorker(); |
| 42 | 42 |
| 43 void SetNewOwner(PrintJobWorkerOwner* new_owner); | 43 void SetNewOwner(PrintJobWorkerOwner* new_owner); |
| 44 | 44 |
| 45 // Initializes the print settings. If |ask_user_for_settings| is true, a | 45 // Initializes the print settings. If |ask_user_for_settings| is true, a |
| 46 // Print... dialog box will be shown to ask the user his preference. | 46 // Print... dialog box will be shown to ask the user his preference. |
| 47 // |is_scripted| should be true for calls coming straight from window.print(). | 47 // |is_scripted| should be true for calls coming straight from window.print(). |
| 48 void GetSettings( | 48 void GetSettings(bool ask_user_for_settings, |
| 49 bool ask_user_for_settings, | 49 int document_page_count, |
| 50 int document_page_count, | 50 bool has_selection, |
| 51 bool has_selection, | 51 MarginType margin_type, |
| 52 MarginType margin_type, | 52 bool is_scripted, |
| 53 bool is_scripted); | 53 bool is_modifiable); |
|
scottmg
2016/06/30 17:48:30
This is probably just my lack of knowledge of this
Lei Zhang
2016/06/30 22:29:34
I added a comment here. There's several "is_modifi
| |
| 54 | 54 |
| 55 // Set the new print settings. | 55 // Set the new print settings. |
| 56 void SetSettings(std::unique_ptr<base::DictionaryValue> new_settings); | 56 void SetSettings(std::unique_ptr<base::DictionaryValue> new_settings); |
| 57 | 57 |
| 58 // Starts the printing loop. Every pages are printed as soon as the data is | 58 // Starts the printing loop. Every pages are printed as soon as the data is |
| 59 // available. Makes sure the new_document is the right one. | 59 // available. Makes sure the new_document is the right one. |
| 60 void StartPrinting(PrintedDocument* new_document); | 60 void StartPrinting(PrintedDocument* new_document); |
| 61 | 61 |
| 62 // Updates the printed document. | 62 // Updates the printed document. |
| 63 void OnDocumentChanged(PrintedDocument* new_document); | 63 void OnDocumentChanged(PrintedDocument* new_document); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 151 | 151 |
| 152 // Used to generate a WeakPtr for callbacks. | 152 // Used to generate a WeakPtr for callbacks. |
| 153 base::WeakPtrFactory<PrintJobWorker> weak_factory_; | 153 base::WeakPtrFactory<PrintJobWorker> weak_factory_; |
| 154 | 154 |
| 155 DISALLOW_COPY_AND_ASSIGN(PrintJobWorker); | 155 DISALLOW_COPY_AND_ASSIGN(PrintJobWorker); |
| 156 }; | 156 }; |
| 157 | 157 |
| 158 } // namespace printing | 158 } // namespace printing |
| 159 | 159 |
| 160 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ | 160 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ |
| OLD | NEW |