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 var localStrings = new LocalStrings(); | 5 var localStrings = new LocalStrings(); |
6 | 6 |
7 // The total page count of the previewed document regardless of which pages the | 7 // The total page count of the previewed document regardless of which pages the |
8 // user has selected. | 8 // user has selected. |
9 var totalPageCount; | 9 var totalPageCount; |
10 | 10 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 * Asks the browser to close the preview tab. | 179 * Asks the browser to close the preview tab. |
180 */ | 180 */ |
181 function handleCancelButtonClick() { | 181 function handleCancelButtonClick() { |
182 chrome.send('closePrintPreviewTab'); | 182 chrome.send('closePrintPreviewTab'); |
183 } | 183 } |
184 | 184 |
185 /** | 185 /** |
186 * Asks the browser to show the native print dialog for printing. | 186 * Asks the browser to show the native print dialog for printing. |
187 */ | 187 */ |
188 function showSystemDialog() { | 188 function showSystemDialog() { |
| 189 $('system-dialog-throbber').classList.remove('hidden'); |
189 chrome.send('showSystemDialog'); | 190 chrome.send('showSystemDialog'); |
190 } | 191 } |
191 | 192 |
192 /** | 193 /** |
193 * Disables the controls which need the initiator tab to generate preview | 194 * Disables the controls which need the initiator tab to generate preview |
194 * data. This function is called when the initiator tab is closed. | 195 * data. This function is called when the initiator tab is closed. |
195 * @param {string} initiatorTabURL The URL of the initiator tab. | 196 * @param {string} initiatorTabURL The URL of the initiator tab. |
196 */ | 197 */ |
197 function onInitiatorTabClosed(initiatorTabURL) { | 198 function onInitiatorTabClosed(initiatorTabURL) { |
198 displayErrorMessageWithButton( | 199 displayErrorMessageWithButton( |
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 this.isLandscape = ''; | 958 this.isLandscape = ''; |
958 } | 959 } |
959 | 960 |
960 /** | 961 /** |
961 * Takes a snapshot of the print settings. | 962 * Takes a snapshot of the print settings. |
962 */ | 963 */ |
963 PrintSettings.prototype.save = function() { | 964 PrintSettings.prototype.save = function() { |
964 this.deviceName = getSelectedPrinterName(); | 965 this.deviceName = getSelectedPrinterName(); |
965 this.isLandscape = isLandscape(); | 966 this.isLandscape = isLandscape(); |
966 } | 967 } |
OLD | NEW |