Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: chrome/browser/resources/print_preview/data/app_state.js

Issue 575333002: Compile print_preview, part 2: reduce down to 260 errors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@I_print_preview
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 11 matching lines...) Expand all
22 /** 22 /**
23 * Whether the app state has been initialized. The app state will ignore all 23 * Whether the app state has been initialized. The app state will ignore all
24 * writes until it has been initialized. 24 * writes until it has been initialized.
25 * @type {boolean} 25 * @type {boolean}
26 * @private 26 * @private
27 */ 27 */
28 this.isInitialized_ = false; 28 this.isInitialized_ = false;
29 }; 29 };
30 30
31 /** 31 /**
32 * Enumeration of field names for serialized app state.
33 * @enum {string}
34 */
35 AppState.Field = {
36 VERSION: 'version',
37 SELECTED_DESTINATION_ID: 'selectedDestinationId',
38 SELECTED_DESTINATION_ACCOUNT: 'selectedDestinationAccount',
39 SELECTED_DESTINATION_ORIGIN: 'selectedDestinationOrigin',
40 SELECTED_DESTINATION_CAPABILITIES: 'selectedDestinationCapabilities',
41 SELECTED_DESTINATION_NAME: 'selectedDestinationName',
42 IS_GCP_PROMO_DISMISSED: 'isGcpPromoDismissed',
43 MEDIA_SIZE: 'mediaSize',
44 MARGINS_TYPE: 'marginsType',
45 CUSTOM_MARGINS: 'customMargins',
46 IS_COLOR_ENABLED: 'isColorEnabled',
47 IS_DUPLEX_ENABLED: 'isDuplexEnabled',
48 IS_HEADER_FOOTER_ENABLED: 'isHeaderFooterEnabled',
49 IS_LANDSCAPE_ENABLED: 'isLandscapeEnabled',
50 IS_COLLATE_ENABLED: 'isCollateEnabled',
51 IS_CSS_BACKGROUND_ENABLED: 'isCssBackgroundEnabled',
52 VENDOR_OPTIONS: 'vendorOptions'
53 };
54
55 /**
56 * Current version of the app state. This value helps to understand how to 32 * Current version of the app state. This value helps to understand how to
57 * parse earlier versions of the app state. 33 * parse earlier versions of the app state.
58 * @type {number} 34 * @type {number}
59 * @const 35 * @const
60 * @private 36 * @private
61 */ 37 */
62 AppState.VERSION_ = 2; 38 AppState.VERSION_ = 2;
63 39
64 /** 40 /**
65 * Name of C++ layer function to persist app state. 41 * Name of C++ layer function to persist app state.
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 persist_: function() { 187 persist_: function() {
212 chrome.send(AppState.NATIVE_FUNCTION_NAME_, 188 chrome.send(AppState.NATIVE_FUNCTION_NAME_,
213 [JSON.stringify(this.state_)]); 189 [JSON.stringify(this.state_)]);
214 } 190 }
215 }; 191 };
216 192
217 return { 193 return {
218 AppState: AppState 194 AppState: AppState
219 }; 195 };
220 }); 196 });
197
198 /**
199 * Enumeration of field names for serialized app state.
200 * @enum {string}
201 */
202 print_preview.AppState.Field = {
203 VERSION: 'version',
204 SELECTED_DESTINATION_ID: 'selectedDestinationId',
205 SELECTED_DESTINATION_ACCOUNT: 'selectedDestinationAccount',
206 SELECTED_DESTINATION_ORIGIN: 'selectedDestinationOrigin',
207 SELECTED_DESTINATION_CAPABILITIES: 'selectedDestinationCapabilities',
208 SELECTED_DESTINATION_NAME: 'selectedDestinationName',
209 IS_GCP_PROMO_DISMISSED: 'isGcpPromoDismissed',
210 MEDIA_SIZE: 'mediaSize',
211 MARGINS_TYPE: 'marginsType',
212 CUSTOM_MARGINS: 'customMargins',
213 IS_COLOR_ENABLED: 'isColorEnabled',
214 IS_DUPLEX_ENABLED: 'isDuplexEnabled',
215 IS_HEADER_FOOTER_ENABLED: 'isHeaderFooterEnabled',
216 IS_LANDSCAPE_ENABLED: 'isLandscapeEnabled',
217 IS_COLLATE_ENABLED: 'isCollateEnabled',
218 IS_CSS_BACKGROUND_ENABLED: 'isCssBackgroundEnabled',
219 VENDOR_OPTIONS: 'vendorOptions'
220 };
Aleksey Shlyapnikov 2014/09/19 18:54:42 What's the reason for this and other similar chang
Vitaly Pavlenko 2014/09/19 20:33:09 Right now Closure Compiler doesn't understand @typ
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698