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_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 void OnGotPrintersForExtension(const base::ListValue& printers, bool done); | 296 void OnGotPrintersForExtension(const base::ListValue& printers, bool done); |
297 | 297 |
298 // Called when an extension reports the set of print capabilites for a | 298 // Called when an extension reports the set of print capabilites for a |
299 // printer. | 299 // printer. |
300 // |printer_id|: The id of the printer whose capabilities are reported. | 300 // |printer_id|: The id of the printer whose capabilities are reported. |
301 // |capabilities|: The printer capabilities. | 301 // |capabilities|: The printer capabilities. |
302 void OnGotExtensionPrinterCapabilities( | 302 void OnGotExtensionPrinterCapabilities( |
303 const std::string& printer_id, | 303 const std::string& printer_id, |
304 const base::DictionaryValue& capabilities); | 304 const base::DictionaryValue& capabilities); |
305 | 305 |
| 306 // Called when an extension print job is completed. |
| 307 // |success|: Whether the job succeeded. |
| 308 // |status|: The returned print job status. Useful for reporting a specific |
| 309 // error. |
| 310 void OnExtensionPrintResult(bool success, const std::string& status); |
| 311 |
306 // Register/unregister from notifications of changes done to the GAIA | 312 // Register/unregister from notifications of changes done to the GAIA |
307 // cookie. | 313 // cookie. |
308 void RegisterForMergeSession(); | 314 void RegisterForMergeSession(); |
309 void UnregisterForMergeSession(); | 315 void UnregisterForMergeSession(); |
310 | 316 |
311 // The underlying dialog object. | 317 // The underlying dialog object. |
312 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; | 318 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; |
313 | 319 |
314 // A count of how many requests received to regenerate preview data. | 320 // A count of how many requests received to regenerate preview data. |
315 // Initialized to 0 then incremented and emitted to a histogram. | 321 // Initialized to 0 then incremented and emitted to a histogram. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 // Notifies tests that want to know if the PDF has been saved. This doesn't | 360 // Notifies tests that want to know if the PDF has been saved. This doesn't |
355 // notify the test if it was a successful save, only that it was attempted. | 361 // notify the test if it was a successful save, only that it was attempted. |
356 base::Closure pdf_file_saved_closure_; | 362 base::Closure pdf_file_saved_closure_; |
357 | 363 |
358 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; | 364 base::WeakPtrFactory<PrintPreviewHandler> weak_factory_; |
359 | 365 |
360 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 366 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
361 }; | 367 }; |
362 | 368 |
363 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 369 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
OLD | NEW |