| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 // Send the PDF data to the cloud to print. | 176 // Send the PDF data to the cloud to print. |
| 177 void SendCloudPrintJob(const base::RefCountedBytes* data); | 177 void SendCloudPrintJob(const base::RefCountedBytes* data); |
| 178 | 178 |
| 179 // Handles printing to PDF. | 179 // Handles printing to PDF. |
| 180 void PrintToPdf(); | 180 void PrintToPdf(); |
| 181 | 181 |
| 182 // Asks the browser to show the cloud print dialog. | 182 // Asks the browser to show the cloud print dialog. |
| 183 void PrintWithCloudPrintDialog(); | 183 void PrintWithCloudPrintDialog(); |
| 184 | 184 |
| 185 // Gets the initiator for the print preview dialog. | 185 // Gets the initiator tab for the print preview dialog. |
| 186 content::WebContents* GetInitiator() 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 |
| 194 // Clears initiator details for the print preview dialog. | 194 // Clears initiator tab details for the print preview dialog. |
| 195 void ClearInitiatorDetails(); | 195 void ClearInitiatorTabDetails(); |
| 196 | 196 |
| 197 // Posts a task to save |data| to pdf at |print_to_pdf_path_|. | 197 // Posts a task to save |data| to pdf at |print_to_pdf_path_|. |
| 198 void PostPrintToPdfTask(); | 198 void PostPrintToPdfTask(); |
| 199 | 199 |
| 200 // Populates |settings| according to the current locale. | 200 // Populates |settings| according to the current locale. |
| 201 void GetNumberFormatAndMeasurementSystem(base::DictionaryValue* settings); | 201 void GetNumberFormatAndMeasurementSystem(base::DictionaryValue* settings); |
| 202 | 202 |
| 203 static printing::StickySettings* GetStickySettings(); | 203 static printing::StickySettings* GetStickySettings(); |
| 204 | 204 |
| 205 bool GetPreviewDataAndTitle(scoped_refptr<base::RefCountedBytes>* data, | 205 bool GetPreviewDataAndTitle(scoped_refptr<base::RefCountedBytes>* data, |
| (...skipping 24 matching lines...) Expand all 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 |