| 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_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 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 GetSettingsAskParam ask_user_for_settings, | 46 GetSettingsAskParam ask_user_for_settings, |
| 47 int expected_page_count, | 47 int expected_page_count, |
| 48 bool has_selection, | 48 bool has_selection, |
| 49 MarginType margin_type, | 49 MarginType margin_type, |
| 50 const base::Closure& callback); | 50 const base::Closure& callback); |
| 51 | 51 |
| 52 // Updates the current settings with |new_settings| dictionary values. | 52 // Updates the current settings with |new_settings| dictionary values. |
| 53 void SetSettings(scoped_ptr<base::DictionaryValue> new_settings, | 53 void SetSettings(scoped_ptr<base::DictionaryValue> new_settings, |
| 54 const base::Closure& callback); | 54 const base::Closure& callback); |
| 55 | 55 |
| 56 // Set a destination for the worker. | |
| 57 void SetWorkerDestination(PrintDestinationInterface* destination); | |
| 58 | |
| 59 // Stops the worker thread since the client is done with this object. | 56 // Stops the worker thread since the client is done with this object. |
| 60 void StopWorker(); | 57 void StopWorker(); |
| 61 | 58 |
| 62 // Returns true if a GetSettings() call is pending completion. | 59 // Returns true if a GetSettings() call is pending completion. |
| 63 bool is_callback_pending() const; | 60 bool is_callback_pending() const; |
| 64 | 61 |
| 65 PrintingContext::Result last_status() const { return last_status_; } | 62 PrintingContext::Result last_status() const { return last_status_; } |
| 66 | 63 |
| 67 // Returns if a worker thread is still associated to this instance. | 64 // Returns if a worker thread is still associated to this instance. |
| 68 bool is_valid() const; | 65 bool is_valid() const; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 92 | 89 |
| 93 // Callback waiting to be run. | 90 // Callback waiting to be run. |
| 94 base::Closure callback_; | 91 base::Closure callback_; |
| 95 | 92 |
| 96 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); | 93 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); |
| 97 }; | 94 }; |
| 98 | 95 |
| 99 } // namespace printing | 96 } // namespace printing |
| 100 | 97 |
| 101 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ | 98 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ |
| OLD | NEW |