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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 } | 329 } |
330 | 330 |
331 var nativeInitialSettings = new print_preview.NativeInitialSettings( | 331 var nativeInitialSettings = new print_preview.NativeInitialSettings( |
332 initialSettings['printAutomaticallyInKioskMode'] || false, | 332 initialSettings['printAutomaticallyInKioskMode'] || false, |
333 numberFormatSymbols[0] || ',', | 333 numberFormatSymbols[0] || ',', |
334 numberFormatSymbols[1] || '.', | 334 numberFormatSymbols[1] || '.', |
335 unitType, | 335 unitType, |
336 initialSettings['previewModifiable'] || false, | 336 initialSettings['previewModifiable'] || false, |
337 initialSettings['initiatorTabTitle'] || '', | 337 initialSettings['initiatorTabTitle'] || '', |
338 initialSettings['documentHasSelection'] || null, | 338 initialSettings['documentHasSelection'] || null, |
339 initialSettings['selectionOnly'] || null, | 339 initialSettings['shouldPrintSelectionOnly'] || null, |
340 initialSettings['printerName'] || null, | 340 initialSettings['printerName'] || null, |
341 initialSettings['appState'] || null); | 341 initialSettings['appState'] || null); |
342 | 342 |
343 var initialSettingsSetEvent = new cr.Event( | 343 var initialSettingsSetEvent = new cr.Event( |
344 NativeLayer.EventType.INITIAL_SETTINGS_SET); | 344 NativeLayer.EventType.INITIAL_SETTINGS_SET); |
345 initialSettingsSetEvent.initialSettings = nativeInitialSettings; | 345 initialSettingsSetEvent.initialSettings = nativeInitialSettings; |
346 this.dispatchEvent(initialSettingsSetEvent); | 346 this.dispatchEvent(initialSettingsSetEvent); |
347 }, | 347 }, |
348 | 348 |
349 /** | 349 /** |
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
712 return this.serializedAppStateStr_; | 712 return this.serializedAppStateStr_; |
713 } | 713 } |
714 }; | 714 }; |
715 | 715 |
716 // Export | 716 // Export |
717 return { | 717 return { |
718 NativeInitialSettings: NativeInitialSettings, | 718 NativeInitialSettings: NativeInitialSettings, |
719 NativeLayer: NativeLayer | 719 NativeLayer: NativeLayer |
720 }; | 720 }; |
721 }); | 721 }); |
OLD | NEW |