| 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_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/ref_counted.h" | 9 #include "base/ref_counted.h" |
| 10 #include "base/weak_ptr.h" | 10 #include "base/weak_ptr.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // WebUIMessageHandler implementation. | 26 // WebUIMessageHandler implementation. |
| 27 virtual void RegisterMessages(); | 27 virtual void RegisterMessages(); |
| 28 | 28 |
| 29 private: | 29 private: |
| 30 friend class EnumeratePrintersTaskProxy; | 30 friend class EnumeratePrintersTaskProxy; |
| 31 | 31 |
| 32 // Get the list of printers. |args| is unused. | 32 // Get the list of printers. |args| is unused. |
| 33 void HandleGetPrinters(const ListValue* args); | 33 void HandleGetPrinters(const ListValue* args); |
| 34 | 34 |
| 35 // Print the preview PDF. |args| is unused. | 35 // Get the job settings from Web UI and initiate printing. |
| 36 // First element of |args| is a job settings json string. |
| 36 void HandlePrint(const ListValue* args); | 37 void HandlePrint(const ListValue* args); |
| 37 | 38 |
| 38 // Send the list of printers to the Web UI. | 39 // Send the list of printers to the Web UI. |
| 39 void SendPrinterList(const ListValue& printers); | 40 void SendPrinterList(const ListValue& printers); |
| 40 | 41 |
| 41 // Pointer to current print system. | 42 // Pointer to current print system. |
| 42 scoped_refptr<printing::PrintBackend> print_backend_; | 43 scoped_refptr<printing::PrintBackend> print_backend_; |
| 43 | 44 |
| 44 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 45 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 48 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
| OLD | NEW |