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 22 matching lines...) Expand all Loading... |
33 * @enum {string} | 33 * @enum {string} |
34 */ | 34 */ |
35 AppState.Field = { | 35 AppState.Field = { |
36 VERSION: 'version', | 36 VERSION: 'version', |
37 SELECTED_DESTINATION_ID: 'selectedDestinationId', | 37 SELECTED_DESTINATION_ID: 'selectedDestinationId', |
38 SELECTED_DESTINATION_ACCOUNT: 'selectedDestinationAccount', | 38 SELECTED_DESTINATION_ACCOUNT: 'selectedDestinationAccount', |
39 SELECTED_DESTINATION_ORIGIN: 'selectedDestinationOrigin', | 39 SELECTED_DESTINATION_ORIGIN: 'selectedDestinationOrigin', |
40 SELECTED_DESTINATION_CAPABILITIES: 'selectedDestinationCapabilities', | 40 SELECTED_DESTINATION_CAPABILITIES: 'selectedDestinationCapabilities', |
41 SELECTED_DESTINATION_NAME: 'selectedDestinationName', | 41 SELECTED_DESTINATION_NAME: 'selectedDestinationName', |
42 IS_GCP_PROMO_DISMISSED: 'isGcpPromoDismissed', | 42 IS_GCP_PROMO_DISMISSED: 'isGcpPromoDismissed', |
| 43 DPI: 'dpi', |
43 MEDIA_SIZE: 'mediaSize', | 44 MEDIA_SIZE: 'mediaSize', |
44 MARGINS_TYPE: 'marginsType', | 45 MARGINS_TYPE: 'marginsType', |
45 CUSTOM_MARGINS: 'customMargins', | 46 CUSTOM_MARGINS: 'customMargins', |
46 IS_COLOR_ENABLED: 'isColorEnabled', | 47 IS_COLOR_ENABLED: 'isColorEnabled', |
47 IS_DUPLEX_ENABLED: 'isDuplexEnabled', | 48 IS_DUPLEX_ENABLED: 'isDuplexEnabled', |
48 IS_HEADER_FOOTER_ENABLED: 'isHeaderFooterEnabled', | 49 IS_HEADER_FOOTER_ENABLED: 'isHeaderFooterEnabled', |
49 IS_LANDSCAPE_ENABLED: 'isLandscapeEnabled', | 50 IS_LANDSCAPE_ENABLED: 'isLandscapeEnabled', |
50 IS_COLLATE_ENABLED: 'isCollateEnabled', | 51 IS_COLLATE_ENABLED: 'isCollateEnabled', |
51 IS_CSS_BACKGROUND_ENABLED: 'isCssBackgroundEnabled', | 52 IS_CSS_BACKGROUND_ENABLED: 'isCssBackgroundEnabled', |
52 VENDOR_OPTIONS: 'vendorOptions' | 53 VENDOR_OPTIONS: 'vendorOptions' |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 persist_: function() { | 215 persist_: function() { |
215 chrome.send(AppState.NATIVE_FUNCTION_NAME_, | 216 chrome.send(AppState.NATIVE_FUNCTION_NAME_, |
216 [JSON.stringify(this.state_)]); | 217 [JSON.stringify(this.state_)]); |
217 } | 218 } |
218 }; | 219 }; |
219 | 220 |
220 return { | 221 return { |
221 AppState: AppState | 222 AppState: AppState |
222 }; | 223 }; |
223 }); | 224 }); |
OLD | NEW |