| 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 * Object used to get and persist the print preview application state. | 9 * Object used to get and persist the print preview application state. |
| 10 * @constructor | 10 * @constructor |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 SELECTED_DESTINATION_NAME: 'selectedDestinationName', | 41 SELECTED_DESTINATION_NAME: 'selectedDestinationName', |
| 42 IS_GCP_PROMO_DISMISSED: 'isGcpPromoDismissed', | 42 IS_GCP_PROMO_DISMISSED: 'isGcpPromoDismissed', |
| 43 MEDIA_SIZE: 'mediaSize', | 43 MEDIA_SIZE: 'mediaSize', |
| 44 MARGINS_TYPE: 'marginsType', | 44 MARGINS_TYPE: 'marginsType', |
| 45 CUSTOM_MARGINS: 'customMargins', | 45 CUSTOM_MARGINS: 'customMargins', |
| 46 IS_COLOR_ENABLED: 'isColorEnabled', | 46 IS_COLOR_ENABLED: 'isColorEnabled', |
| 47 IS_DUPLEX_ENABLED: 'isDuplexEnabled', | 47 IS_DUPLEX_ENABLED: 'isDuplexEnabled', |
| 48 IS_HEADER_FOOTER_ENABLED: 'isHeaderFooterEnabled', | 48 IS_HEADER_FOOTER_ENABLED: 'isHeaderFooterEnabled', |
| 49 IS_LANDSCAPE_ENABLED: 'isLandscapeEnabled', | 49 IS_LANDSCAPE_ENABLED: 'isLandscapeEnabled', |
| 50 IS_COLLATE_ENABLED: 'isCollateEnabled', | 50 IS_COLLATE_ENABLED: 'isCollateEnabled', |
| 51 IS_CSS_BACKGROUND_ENABLED: 'isCssBackgroundEnabled' | 51 IS_CSS_BACKGROUND_ENABLED: 'isCssBackgroundEnabled', |
| 52 VENDOR_OPTIONS: 'vendorOptions' |
| 52 }; | 53 }; |
| 53 | 54 |
| 54 /** | 55 /** |
| 55 * Current version of the app state. This value helps to understand how to | 56 * Current version of the app state. This value helps to understand how to |
| 56 * parse earlier versions of the app state. | 57 * parse earlier versions of the app state. |
| 57 * @type {number} | 58 * @type {number} |
| 58 * @const | 59 * @const |
| 59 * @private | 60 * @private |
| 60 */ | 61 */ |
| 61 AppState.VERSION_ = 2; | 62 AppState.VERSION_ = 2; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 persist_: function() { | 211 persist_: function() { |
| 211 chrome.send(AppState.NATIVE_FUNCTION_NAME_, | 212 chrome.send(AppState.NATIVE_FUNCTION_NAME_, |
| 212 [JSON.stringify(this.state_)]); | 213 [JSON.stringify(this.state_)]); |
| 213 } | 214 } |
| 214 }; | 215 }; |
| 215 | 216 |
| 216 return { | 217 return { |
| 217 AppState: AppState | 218 AppState: AppState |
| 218 }; | 219 }; |
| 219 }); | 220 }); |
| OLD | NEW |