| 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_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/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/printing/print_job_worker_owner.h" | 10 #include "chrome/browser/printing/print_job_worker_owner.h" |
| 11 #include "printing/print_job_constants.h" |
| 11 #include "ui/gfx/native_widget_types.h" | 12 #include "ui/gfx/native_widget_types.h" |
| 12 | 13 |
| 13 class CancelableTask; | 14 class CancelableTask; |
| 14 class MessageLoop; | 15 class MessageLoop; |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class DictionaryValue; | 18 class DictionaryValue; |
| 18 class Thread; | 19 class Thread; |
| 19 } | 20 } |
| 20 | 21 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 42 virtual int cookie() const; | 43 virtual int cookie() const; |
| 43 | 44 |
| 44 // Initializes the printing context. It is fine to call this function multiple | 45 // Initializes the printing context. It is fine to call this function multiple |
| 45 // times to reinitialize the settings. |parent_view| parameter's window will | 46 // times to reinitialize the settings. |parent_view| parameter's window will |
| 46 // be the owner of the print setting dialog box. It is unused when | 47 // be the owner of the print setting dialog box. It is unused when |
| 47 // |ask_for_user_settings| is DEFAULTS. | 48 // |ask_for_user_settings| is DEFAULTS. |
| 48 void GetSettings(GetSettingsAskParam ask_user_for_settings, | 49 void GetSettings(GetSettingsAskParam ask_user_for_settings, |
| 49 gfx::NativeView parent_view, | 50 gfx::NativeView parent_view, |
| 50 int expected_page_count, | 51 int expected_page_count, |
| 51 bool has_selection, | 52 bool has_selection, |
| 52 bool use_overlays, | 53 MarginType margin_type, |
| 53 CancelableTask* callback); | 54 CancelableTask* callback); |
| 54 | 55 |
| 55 // Updates the current settings with |new_settings| dictionary values. | 56 // Updates the current settings with |new_settings| dictionary values. |
| 56 void SetSettings(const base::DictionaryValue& new_settings, | 57 void SetSettings(const base::DictionaryValue& new_settings, |
| 57 CancelableTask* callback); | 58 CancelableTask* callback); |
| 58 | 59 |
| 59 // Stops the worker thread since the client is done with this object. | 60 // Stops the worker thread since the client is done with this object. |
| 60 void StopWorker(); | 61 void StopWorker(); |
| 61 | 62 |
| 62 // Returns true if a GetSettings() call is pending completion. | 63 // Returns true if a GetSettings() call is pending completion. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 98 |
| 98 // Task waiting to be executed. | 99 // Task waiting to be executed. |
| 99 scoped_ptr<CancelableTask> callback_; | 100 scoped_ptr<CancelableTask> callback_; |
| 100 | 101 |
| 101 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); | 102 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 } // namespace printing | 105 } // namespace printing |
| 105 | 106 |
| 106 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ | 107 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ |
| OLD | NEW |