| 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_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Clear the existing print preview data. | 36 // Clear the existing print preview data. |
| 37 void ClearAllPreviewData(); | 37 void ClearAllPreviewData(); |
| 38 | 38 |
| 39 // Notify the Web UI that there is a print preview request. | 39 // Notify the Web UI that there is a print preview request. |
| 40 // There should be a matching call to OnPreviewDataIsAvailable() or | 40 // There should be a matching call to OnPreviewDataIsAvailable() or |
| 41 // OnPrintPreviewFailed(). | 41 // OnPrintPreviewFailed(). |
| 42 void OnPrintPreviewRequest(); | 42 void OnPrintPreviewRequest(); |
| 43 | 43 |
| 44 // Notify the Web UI that the print preview will have |page_count| pages. | 44 // Notify the Web UI that the print preview will have |page_count| pages. |
| 45 // |is_modifiable| indicates if the preview can be rerendered with different | 45 // |is_modifiable| indicates if the preview can be rerendered with different |
| 46 // print settings. | 46 // print settings. |preview_request_id| indicates wich request resulted in |
| 47 // this response. |
| 47 void OnDidGetPreviewPageCount(int document_cookie_, | 48 void OnDidGetPreviewPageCount(int document_cookie_, |
| 48 int page_count, | 49 int page_count, |
| 49 bool is_modifiable); | 50 bool is_modifiable, |
| 51 int preview_request_id); |
| 50 | 52 |
| 51 // Notify the Web UI that the 0-based page |page_number| has been rendered. | 53 // Notify the Web UI that the 0-based page |page_number| has been rendered. |
| 52 void OnDidPreviewPage(int page_number); | 54 void OnDidPreviewPage(int page_number, int preview_request_id); |
| 53 | 55 |
| 54 // Notify the Web UI renderer that preview data is available. | 56 // Notify the Web UI renderer that preview data is available. |
| 55 // |expected_pages_count| specifies the total number of pages. | 57 // |expected_pages_count| specifies the total number of pages. |
| 56 // |job_title| is the title of the page being previewed. | 58 // |job_title| is the title of the page being previewed. |
| 57 // |preview_request_id| indicates wich request resulted in this response. | 59 // |preview_request_id| indicates wich request resulted in this response. |
| 58 void OnPreviewDataIsAvailable(int expected_pages_count, | 60 void OnPreviewDataIsAvailable(int expected_pages_count, |
| 59 const string16& job_title, | 61 const string16& job_title, |
| 60 int preview_request_id); | 62 int preview_request_id); |
| 61 | 63 |
| 62 void OnReusePreviewData(int preview_request_id); | 64 void OnReusePreviewData(int preview_request_id); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // The number of print preview requests in flight. | 105 // The number of print preview requests in flight. |
| 104 uint32 request_count_; | 106 uint32 request_count_; |
| 105 | 107 |
| 106 // Document cookie from the initiator renderer. | 108 // Document cookie from the initiator renderer. |
| 107 int document_cookie_; | 109 int document_cookie_; |
| 108 | 110 |
| 109 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); | 111 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); |
| 110 }; | 112 }; |
| 111 | 113 |
| 112 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ | 114 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_UI_H_ |
| OLD | NEW |