OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_PRINTER_QUERY_H_ | 5 #ifndef CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ |
6 #define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ | 6 #define CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "chrome/browser/printing/print_job_worker_owner.h" | 10 #include "chrome/browser/printing/print_job_worker_owner.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 DEFAULTS, | 29 DEFAULTS, |
30 ASK_USER, | 30 ASK_USER, |
31 }; | 31 }; |
32 | 32 |
33 PrinterQuery(); | 33 PrinterQuery(); |
34 | 34 |
35 // PrintJobWorkerOwner | 35 // PrintJobWorkerOwner |
36 virtual void GetSettingsDone(const PrintSettings& new_settings, | 36 virtual void GetSettingsDone(const PrintSettings& new_settings, |
37 PrintingContext::Result result); | 37 PrintingContext::Result result); |
38 virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner); | 38 virtual PrintJobWorker* DetachWorker(PrintJobWorkerOwner* new_owner); |
39 virtual MessageLoop* message_loop() { | 39 virtual MessageLoop* message_loop(); |
40 return io_message_loop_; | 40 virtual const PrintSettings& settings() const; |
41 } | 41 virtual int cookie() const; |
42 virtual const PrintSettings& settings() const { return settings_; } | |
43 | |
44 virtual int cookie() const { return cookie_; } | |
45 | 42 |
46 // Initializes the printing context. It is fine to call this function multiple | 43 // Initializes the printing context. It is fine to call this function multiple |
47 // times to reinitialize the settings. |parent_view| parameter's window will | 44 // times to reinitialize the settings. |parent_view| parameter's window will |
48 // be the owner of the print setting dialog box. It is unused when | 45 // be the owner of the print setting dialog box. It is unused when |
49 // |ask_for_user_settings| is DEFAULTS. | 46 // |ask_for_user_settings| is DEFAULTS. |
50 void GetSettings(GetSettingsAskParam ask_user_for_settings, | 47 void GetSettings(GetSettingsAskParam ask_user_for_settings, |
51 gfx::NativeView parent_view, | 48 gfx::NativeView parent_view, |
52 int expected_page_count, | 49 int expected_page_count, |
53 bool has_selection, | 50 bool has_selection, |
54 bool use_overlays, | 51 bool use_overlays, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 91 |
95 // Task waiting to be executed. | 92 // Task waiting to be executed. |
96 scoped_ptr<CancelableTask> callback_; | 93 scoped_ptr<CancelableTask> callback_; |
97 | 94 |
98 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); | 95 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); |
99 }; | 96 }; |
100 | 97 |
101 } // namespace printing | 98 } // namespace printing |
102 | 99 |
103 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ | 100 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ |
OLD | NEW |