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 // TODO(rltoscano): Move data/* into print_preview.data namespace | 5 // TODO(rltoscano): Move data/* into print_preview.data namespace |
6 | 6 |
7 var localStrings = new LocalStrings(templateData); | 7 var localStrings = new LocalStrings(templateData); |
8 | 8 |
9 <include src="component.js"/> | 9 <include src="component.js"/> |
10 | 10 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
240 __proto__: print_preview.Component.prototype, | 240 __proto__: print_preview.Component.prototype, |
241 | 241 |
242 /** Sets up the page and print preview by getting the printer list. */ | 242 /** Sets up the page and print preview by getting the printer list. */ |
243 initialize: function() { | 243 initialize: function() { |
244 this.decorate($('print-preview')); | 244 this.decorate($('print-preview')); |
245 i18nTemplate.process(document, templateData); | 245 i18nTemplate.process(document, templateData); |
246 if (!this.previewArea_.hasCompatiblePlugin) { | 246 if (!this.previewArea_.hasCompatiblePlugin) { |
247 this.setIsEnabled_(false); | 247 this.setIsEnabled_(false); |
248 } | 248 } |
249 this.nativeLayer_.startGetInitialSettings(); | 249 this.nativeLayer_.startGetInitialSettings(); |
250 this.nativeLayer_.startGetPdfCapabilities(); | |
Vitaly Buka (NO REVIEWS)
2014/05/20 22:52:19
don't need to start this until PDF is selected.
| |
250 cr.ui.FocusOutlineManager.forDocument(document); | 251 cr.ui.FocusOutlineManager.forDocument(document); |
251 }, | 252 }, |
252 | 253 |
253 /** @override */ | 254 /** @override */ |
254 enterDocument: function() { | 255 enterDocument: function() { |
255 // Native layer events. | 256 // Native layer events. |
256 this.tracker.add( | 257 this.tracker.add( |
257 this.nativeLayer_, | 258 this.nativeLayer_, |
258 print_preview.NativeLayer.EventType.INITIAL_SETTINGS_SET, | 259 print_preview.NativeLayer.EventType.INITIAL_SETTINGS_SET, |
259 this.onInitialSettingsSet_.bind(this)); | 260 this.onInitialSettingsSet_.bind(this)); |
(...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1034 <include src="search/recent_destination_list.js"/> | 1035 <include src="search/recent_destination_list.js"/> |
1035 <include src="search/destination_list_item.js"/> | 1036 <include src="search/destination_list_item.js"/> |
1036 <include src="search/destination_search.js"/> | 1037 <include src="search/destination_search.js"/> |
1037 <include src="search/search_box.js"/> | 1038 <include src="search/search_box.js"/> |
1038 <include src="search/fedex_tos.js"/> | 1039 <include src="search/fedex_tos.js"/> |
1039 | 1040 |
1040 window.addEventListener('DOMContentLoaded', function() { | 1041 window.addEventListener('DOMContentLoaded', function() { |
1041 printPreview = new print_preview.PrintPreview(); | 1042 printPreview = new print_preview.PrintPreview(); |
1042 printPreview.initialize(); | 1043 printPreview.initialize(); |
1043 }); | 1044 }); |
OLD | NEW |