| 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/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 void HandleManageCloudPrint(const base::ListValue* args); | 123 void HandleManageCloudPrint(const base::ListValue* args); |
| 124 | 124 |
| 125 // Gathers UMA stats when the print preview dialog is about to close. | 125 // Gathers UMA stats when the print preview dialog is about to close. |
| 126 // |args| is unused. | 126 // |args| is unused. |
| 127 void HandleClosePreviewDialog(const base::ListValue* args); | 127 void HandleClosePreviewDialog(const base::ListValue* args); |
| 128 | 128 |
| 129 // Asks the browser to show the native printer management dialog. | 129 // Asks the browser to show the native printer management dialog. |
| 130 // |args| is unused. | 130 // |args| is unused. |
| 131 void HandleManagePrinters(const base::ListValue* args); | 131 void HandleManagePrinters(const base::ListValue* args); |
| 132 | 132 |
| 133 // Asks the browser to show the cloud print dialog. |args| is unused. | 133 // Asks the browser to show the cloud print dialog. |args| is signle int with |
| 134 void HandlePrintWithCloudPrint(const base::ListValue* args); | 134 // page count. |
| 135 void HandlePrintWithCloudPrintDialog(const base::ListValue* args); |
| 135 | 136 |
| 136 // Asks the browser for several settings that are needed before the first | 137 // Asks the browser for several settings that are needed before the first |
| 137 // preview is displayed. | 138 // preview is displayed. |
| 138 void HandleGetInitialSettings(const base::ListValue* args); | 139 void HandleGetInitialSettings(const base::ListValue* args); |
| 139 | 140 |
| 140 // Reports histogram data for a print preview UI action. |args| should consist | 141 // Reports histogram data for a print preview UI action. |args| should consist |
| 141 // of two elements: the bucket name, and the bucket event. | 142 // of two elements: the bucket name, and the bucket event. |
| 142 void HandleReportUiEvent(const base::ListValue* args); | 143 void HandleReportUiEvent(const base::ListValue* args); |
| 143 | 144 |
| 144 // Forces the opening of a new tab. |args| should consist of one element: the | 145 // Forces the opening of a new tab. |args| should consist of one element: the |
| (...skipping 27 matching lines...) Expand all Loading... |
| 172 // Send whether cloud print integration should be enabled. | 173 // Send whether cloud print integration should be enabled. |
| 173 void SendCloudPrintEnabled(); | 174 void SendCloudPrintEnabled(); |
| 174 | 175 |
| 175 // Send the PDF data to the cloud to print. | 176 // Send the PDF data to the cloud to print. |
| 176 void SendCloudPrintJob(const base::RefCountedBytes* data); | 177 void SendCloudPrintJob(const base::RefCountedBytes* data); |
| 177 | 178 |
| 178 // Handles printing to PDF. | 179 // Handles printing to PDF. |
| 179 void PrintToPdf(); | 180 void PrintToPdf(); |
| 180 | 181 |
| 181 // Asks the browser to show the cloud print dialog. | 182 // Asks the browser to show the cloud print dialog. |
| 182 void PrintWithCloudPrintDialog(const base::RefCountedBytes* data, | 183 void PrintWithCloudPrintDialog(); |
| 183 const string16& title); | |
| 184 | 184 |
| 185 // Gets the initiator tab for the print preview dialog. | 185 // Gets the initiator tab for the print preview dialog. |
| 186 content::WebContents* GetInitiatorTab() const; | 186 content::WebContents* GetInitiatorTab() const; |
| 187 | 187 |
| 188 // Closes the preview dialog. | 188 // Closes the preview dialog. |
| 189 void ClosePreviewDialog(); | 189 void ClosePreviewDialog(); |
| 190 | 190 |
| 191 // Adds all the recorded stats taken so far to histogram counts. | 191 // Adds all the recorded stats taken so far to histogram counts. |
| 192 void ReportStats(); | 192 void ReportStats(); |
| 193 | 193 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 scoped_ptr<base::FilePath> print_to_pdf_path_; | 230 scoped_ptr<base::FilePath> print_to_pdf_path_; |
| 231 | 231 |
| 232 // Holds token service to get OAuth2 access tokens. | 232 // Holds token service to get OAuth2 access tokens. |
| 233 class AccessTokenService; | 233 class AccessTokenService; |
| 234 scoped_ptr<AccessTokenService> token_service_; | 234 scoped_ptr<AccessTokenService> token_service_; |
| 235 | 235 |
| 236 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); | 236 DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler); |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ | 239 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_HANDLER_H_ |
| OLD | NEW |