| 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 25 matching lines...) Expand all Loading... |
| 36 class PrintJobWorker { | 36 class PrintJobWorker { |
| 37 public: | 37 public: |
| 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 their 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 // |is_modifiable| implies HTML and not other formats like PDF. | 48 // |is_modifiable| implies HTML and not other formats like PDF. |
| 49 void GetSettings(bool ask_user_for_settings, | 49 void GetSettings(bool ask_user_for_settings, |
| 50 int document_page_count, | 50 int document_page_count, |
| 51 bool has_selection, | 51 bool has_selection, |
| 52 MarginType margin_type, | 52 MarginType margin_type, |
| 53 bool is_scripted, | 53 bool is_scripted, |
| 54 bool is_modifiable); | 54 bool is_modifiable); |
| 55 | 55 |
| 56 // Set the new print settings. | 56 // Set the new print settings. |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 // Used to generate a WeakPtr for callbacks. | 153 // Used to generate a WeakPtr for callbacks. |
| 154 base::WeakPtrFactory<PrintJobWorker> weak_factory_; | 154 base::WeakPtrFactory<PrintJobWorker> weak_factory_; |
| 155 | 155 |
| 156 DISALLOW_COPY_AND_ASSIGN(PrintJobWorker); | 156 DISALLOW_COPY_AND_ASSIGN(PrintJobWorker); |
| 157 }; | 157 }; |
| 158 | 158 |
| 159 } // namespace printing | 159 } // namespace printing |
| 160 | 160 |
| 161 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ | 161 #endif // CHROME_BROWSER_PRINTING_PRINT_JOB_WORKER_H_ |
| OLD | NEW |