Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_ui.h

Issue 2962983002: Print Preview: change getPreview to cr.sendWithPromise (Closed)
Patch Set: Rebase Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // |preview_request_id| indicates wich request resulted in this response. 102 // |preview_request_id| indicates wich request resulted in this response.
103 void OnDidPreviewPage(int page_number, int preview_request_id); 103 void OnDidPreviewPage(int page_number, int preview_request_id);
104 104
105 // Notifies the Web UI renderer that preview data is available. 105 // Notifies the Web UI renderer that preview data is available.
106 // |expected_pages_count| specifies the total number of pages. 106 // |expected_pages_count| specifies the total number of pages.
107 // |preview_request_id| indicates which request resulted in this response. 107 // |preview_request_id| indicates which request resulted in this response.
108 void OnPreviewDataIsAvailable(int expected_pages_count, 108 void OnPreviewDataIsAvailable(int expected_pages_count,
109 int preview_request_id); 109 int preview_request_id);
110 110
111 // Notifies the Web UI that the print preview failed to render. 111 // Notifies the Web UI that the print preview failed to render.
112 void OnPrintPreviewFailed(); 112 void OnPrintPreviewFailed(int request_id);
113 113
114 // Notified the Web UI that this print preview dialog's RenderProcess has been 114 // Notified the Web UI that this print preview dialog's RenderProcess has been
115 // closed, which may occur for several reasons, e.g. tab closure or crash. 115 // closed, which may occur for several reasons, e.g. tab closure or crash.
116 void OnPrintPreviewDialogClosed(); 116 void OnPrintPreviewDialogClosed();
117 117
118 // Notifies the Web UI that initiator is closed, so we can disable all the 118 // Notifies the Web UI that initiator is closed, so we can disable all the
119 // controls that need the initiator for generating the preview data. 119 // controls that need the initiator for generating the preview data.
120 void OnInitiatorClosed(); 120 void OnInitiatorClosed();
121 121
122 // Notifies the Web UI that the printer is unavailable or its settings are 122 // Notifies the Web UI that the printer is unavailable or its settings are
123 // invalid. 123 // invalid.
124 void OnInvalidPrinterSettings(); 124 void OnInvalidPrinterSettings(int request_id);
125 125
126 // Notifies the Web UI to cancel the pending preview request. 126 // Notifies the Web UI to cancel the pending preview request.
127 void OnCancelPendingPreviewRequest(); 127 void OnCancelPendingPreviewRequest();
128 128
129 // Hides the print preview dialog. 129 // Hides the print preview dialog.
130 void OnHidePreviewDialog(); 130 void OnHidePreviewDialog();
131 131
132 // Closes the print preview dialog. 132 // Closes the print preview dialog.
133 void OnClosePrintPreviewDialog(); 133 void OnClosePrintPreviewDialog();
134 134
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 // title. 181 // title.
182 base::string16 initiator_title_; 182 base::string16 initiator_title_;
183 183
184 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not. 184 // Keeps track of whether OnClosePrintPreviewDialog() has been called or not.
185 bool dialog_closed_; 185 bool dialog_closed_;
186 186
187 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI); 187 DISALLOW_COPY_AND_ASSIGN(PrintPreviewUI);
188 }; 188 };
189 189
190 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_ 190 #endif // CHROME_BROWSER_UI_WEBUI_PRINT_PREVIEW_PRINT_PREVIEW_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698