| 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 // |ask_for_user_settings| is DEFAULTS. | 46 // |ask_for_user_settings| is DEFAULTS. |
| 47 void GetSettings( | 47 void GetSettings( |
| 48 GetSettingsAskParam ask_user_for_settings, | 48 GetSettingsAskParam ask_user_for_settings, |
| 49 scoped_ptr<PrintingUIWebContentsObserver> web_contents_observer, | 49 scoped_ptr<PrintingUIWebContentsObserver> web_contents_observer, |
| 50 int expected_page_count, | 50 int expected_page_count, |
| 51 bool has_selection, | 51 bool has_selection, |
| 52 MarginType margin_type, | 52 MarginType margin_type, |
| 53 const base::Closure& callback); | 53 const base::Closure& callback); |
| 54 | 54 |
| 55 // Updates the current settings with |new_settings| dictionary values. | 55 // Updates the current settings with |new_settings| dictionary values. |
| 56 void SetSettings(const base::DictionaryValue& new_settings, | 56 void SetSettings(scoped_ptr<base::DictionaryValue> new_settings, |
| 57 const base::Closure& callback); | 57 const base::Closure& callback); |
| 58 | 58 |
| 59 // Set a destination for the worker. | 59 // Set a destination for the worker. |
| 60 void SetWorkerDestination(PrintDestinationInterface* destination); | 60 void SetWorkerDestination(PrintDestinationInterface* destination); |
| 61 | 61 |
| 62 // Stops the worker thread since the client is done with this object. | 62 // Stops the worker thread since the client is done with this object. |
| 63 void StopWorker(); | 63 void StopWorker(); |
| 64 | 64 |
| 65 // Returns true if a GetSettings() call is pending completion. | 65 // Returns true if a GetSettings() call is pending completion. |
| 66 bool is_callback_pending() const; | 66 bool is_callback_pending() const; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 95 | 95 |
| 96 // Callback waiting to be run. | 96 // Callback waiting to be run. |
| 97 base::Closure callback_; | 97 base::Closure callback_; |
| 98 | 98 |
| 99 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); | 99 DISALLOW_COPY_AND_ASSIGN(PrinterQuery); |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 } // namespace printing | 102 } // namespace printing |
| 103 | 103 |
| 104 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ | 104 #endif // CHROME_BROWSER_PRINTING_PRINTER_QUERY_H_ |
| OLD | NEW |