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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 get selectedDestinationId() { | 76 get selectedDestinationId() { |
77 return this.state_[AppState.Field.SELECTED_DESTINATION_ID]; | 77 return this.state_[AppState.Field.SELECTED_DESTINATION_ID]; |
78 }, | 78 }, |
79 | 79 |
80 /** @return {?string} Account the selected destination is registered for. */ | 80 /** @return {?string} Account the selected destination is registered for. */ |
81 get selectedDestinationAccount() { | 81 get selectedDestinationAccount() { |
82 return this.state_[AppState.Field.SELECTED_DESTINATION_ACCOUNT]; | 82 return this.state_[AppState.Field.SELECTED_DESTINATION_ACCOUNT]; |
83 }, | 83 }, |
84 | 84 |
85 /** | 85 /** |
86 * @return {?print_preview.Destination.Origin.<string>} Origin of the | 86 * @return {?print_preview.Destination.Origin<string>} Origin of the |
87 * selected destination. | 87 * selected destination. |
88 */ | 88 */ |
89 get selectedDestinationOrigin() { | 89 get selectedDestinationOrigin() { |
90 return this.state_[AppState.Field.SELECTED_DESTINATION_ORIGIN]; | 90 return this.state_[AppState.Field.SELECTED_DESTINATION_ORIGIN]; |
91 }, | 91 }, |
92 | 92 |
93 /** @return {?print_preview.Cdd} CDD of the selected destination. */ | 93 /** @return {?print_preview.Cdd} CDD of the selected destination. */ |
94 get selectedDestinationCapabilities() { | 94 get selectedDestinationCapabilities() { |
95 return this.state_[AppState.Field.SELECTED_DESTINATION_CAPABILITIES]; | 95 return this.state_[AppState.Field.SELECTED_DESTINATION_CAPABILITIES]; |
96 }, | 96 }, |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 persist_: function() { | 225 persist_: function() { |
226 chrome.send(AppState.NATIVE_FUNCTION_NAME_, | 226 chrome.send(AppState.NATIVE_FUNCTION_NAME_, |
227 [JSON.stringify(this.state_)]); | 227 [JSON.stringify(this.state_)]); |
228 } | 228 } |
229 }; | 229 }; |
230 | 230 |
231 return { | 231 return { |
232 AppState: AppState | 232 AppState: AppState |
233 }; | 233 }; |
234 }); | 234 }); |
OLD | NEW |