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/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void HandlePrint(const ListValue* args); | 53 void HandlePrint(const ListValue* args); |
54 | 54 |
55 // Get the printer capabilities. | 55 // Get the printer capabilities. |
56 // First element of |args| is the printer name. | 56 // First element of |args| is the printer name. |
57 void HandleGetPrinterCapabilities(const ListValue* args); | 57 void HandleGetPrinterCapabilities(const ListValue* args); |
58 | 58 |
59 // Ask the initiator renderer to show the native print system dialog. | 59 // Ask the initiator renderer to show the native print system dialog. |
60 // |args| is unused. | 60 // |args| is unused. |
61 void HandleShowSystemDialog(const ListValue* args); | 61 void HandleShowSystemDialog(const ListValue* args); |
62 | 62 |
| 63 // Bring up a web page to allow the user to configure cloud print. |
| 64 void HandleManageCloudPrint(const ListValue* args); |
| 65 |
63 // Ask the browser to show the native printer management dialog. | 66 // Ask the browser to show the native printer management dialog. |
64 // |args| is unused. | 67 // |args| is unused. |
65 void HandleManagePrinters(const ListValue* args); | 68 void HandleManagePrinters(const ListValue* args); |
66 | 69 |
67 // Ask the browser to close the preview tab. | 70 // Ask the browser to close the preview tab. |
68 // |args| is unused. | 71 // |args| is unused. |
69 void HandleClosePreviewTab(const ListValue* args); | 72 void HandleClosePreviewTab(const ListValue* args); |
70 | 73 |
71 // Send the printer capabilities to the Web UI. | 74 // Send the printer capabilities to the Web UI. |
72 // |settings_info| contains printer capabilities information. | 75 // |settings_info| contains printer capabilities information. |
73 void SendPrinterCapabilities(const DictionaryValue& settings_info); | 76 void SendPrinterCapabilities(const DictionaryValue& settings_info); |
74 | 77 |
75 // Send the list of printers to the Web UI. | 78 // Send the list of printers to the Web UI. |
76 void SendPrinterList(const ListValue& printers, | 79 void SetupPrinterList(const ListValue& printers, |
77 const FundamentalValue& default_printer_index); | 80 const FundamentalValue& default_printer_index); |
| 81 |
| 82 // Send whether cloud print integration should be enabled. |
| 83 void SendCloudPrintEnabled(); |
| 84 |
| 85 // Send the PDF data to the cloud to print. |
| 86 void SendCloudPrintJob(const DictionaryValue& settings); |
78 | 87 |
79 // Helper function to get the initiator tab for the print preview tab. | 88 // Helper function to get the initiator tab for the print preview tab. |
80 TabContents* GetInitiatorTab(); | 89 TabContents* GetInitiatorTab(); |
81 | 90 |
82 // Helper function to close the print preview tab. | 91 // Helper function to close the print preview tab. |
83 void ClosePrintPreviewTab(); | 92 void ClosePrintPreviewTab(); |
84 | 93 |
85 // Helper function to activate the initiator tab and close the preview tab. | 94 // Helper function to activate the initiator tab and close the preview tab. |
86 void ActivateInitiatorTabAndClosePreviewTab(); | 95 void ActivateInitiatorTabAndClosePreviewTab(); |
87 | 96 |
(...skipping 18 matching lines...) Expand all Loading... |
106 // A count of how many times print preview failed. | 115 // A count of how many times print preview failed. |
107 int print_preview_failed_count_; | 116 int print_preview_failed_count_; |
108 | 117 |
109 // Whether we have already logged the number of printers this session. | 118 // Whether we have already logged the number of printers this session. |
110 bool has_logged_printers_count_; | 119 bool has_logged_printers_count_; |
111 | 120 |
112 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 121 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
113 }; | 122 }; |
114 | 123 |
115 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ | 124 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_HANDLER_H_ |
OLD | NEW |