Chromium Code Reviews| 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 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1033 <include src="search/cloud_destination_list.js"/> | 1033 <include src="search/cloud_destination_list.js"/> |
| 1034 <include src="search/recent_destination_list.js"/> | 1034 <include src="search/recent_destination_list.js"/> |
| 1035 <include src="search/destination_list_item.js"/> | 1035 <include src="search/destination_list_item.js"/> |
| 1036 <include src="search/destination_search.js"/> | 1036 <include src="search/destination_search.js"/> |
| 1037 <include src="search/search_box.js"/> | 1037 <include src="search/search_box.js"/> |
| 1038 <include src="search/fedex_tos.js"/> | 1038 <include src="search/fedex_tos.js"/> |
| 1039 | 1039 |
| 1040 window.addEventListener('DOMContentLoaded', function() { | 1040 window.addEventListener('DOMContentLoaded', function() { |
| 1041 printPreview = new print_preview.PrintPreview(); | 1041 printPreview = new print_preview.PrintPreview(); |
| 1042 printPreview.initialize(); | 1042 printPreview.initialize(); |
| 1043 | |
| 1044 function temp() { | |
| 1045 chrome.send('UILoaded'); | |
| 1046 } | |
| 1047 (function func() { | |
| 1048 var settings = $('layout-settings'); | |
| 1049 if (settings.offsetWidth > 10) { | |
|
Lei Zhang
2014/06/13 22:20:11
So instead of looping and look for this as the sig
| |
| 1050 if (printPreview) { | |
| 1051 printPreview.destinationStore_.selectDefaultDestination_(); | |
| 1052 var portrait = document.getElementsByClassName( | |
| 1053 'layout-settings-landscape-radio')[0]; | |
| 1054 if (portrait) { | |
| 1055 portrait.click(); | |
| 1056 } | |
| 1057 setTimeout(temp, 6000); | |
| 1058 } | |
| 1059 } | |
| 1060 else { | |
| 1061 setTimeout(func, 50); | |
| 1062 } | |
| 1063 })(); | |
| 1043 }); | 1064 }); |
| OLD | NEW |