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 cr.define('print_preview', function() { | 5 cr.define('print_preview', function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * An interface to the native Chromium printing system layer. | 9 * An interface to the native Chromium printing system layer. |
10 * @constructor | 10 * @constructor |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 /** Shows Google Cloud Print's web-based print dialog. | 332 /** Shows Google Cloud Print's web-based print dialog. |
333 * @param {number} pageCount Number of pages to print. | 333 * @param {number} pageCount Number of pages to print. |
334 */ | 334 */ |
335 startShowCloudPrintDialog: function(pageCount) { | 335 startShowCloudPrintDialog: function(pageCount) { |
336 chrome.send('printWithCloudPrintDialog', [pageCount]); | 336 chrome.send('printWithCloudPrintDialog', [pageCount]); |
337 }, | 337 }, |
338 | 338 |
339 /** Closes the print preview dialog. */ | 339 /** Closes the print preview dialog. */ |
340 startCloseDialog: function() { | 340 startCloseDialog: function() { |
341 chrome.send('closePrintPreviewDialog'); | 341 chrome.send('closePrintPreviewDialog'); |
342 chrome.send('DialogClose'); | 342 chrome.send('dialogClose'); |
343 }, | 343 }, |
344 | 344 |
345 /** Hide the print preview dialog and allow the native layer to close it. */ | 345 /** Hide the print preview dialog and allow the native layer to close it. */ |
346 startHideDialog: function() { | 346 startHideDialog: function() { |
347 chrome.send('hidePreview'); | 347 chrome.send('hidePreview'); |
348 }, | 348 }, |
349 | 349 |
350 /** | 350 /** |
351 * Opens the Google Cloud Print sign-in tab. The DESTINATIONS_RELOAD event | 351 * Opens the Google Cloud Print sign-in tab. The DESTINATIONS_RELOAD event |
352 * will be dispatched in response. | 352 * will be dispatched in response. |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 return this.serializedAppStateStr_; | 849 return this.serializedAppStateStr_; |
850 } | 850 } |
851 }; | 851 }; |
852 | 852 |
853 // Export | 853 // Export |
854 return { | 854 return { |
855 NativeInitialSettings: NativeInitialSettings, | 855 NativeInitialSettings: NativeInitialSettings, |
856 NativeLayer: NativeLayer | 856 NativeLayer: NativeLayer |
857 }; | 857 }; |
858 }); | 858 }); |
OLD | NEW |