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 <include src="component.js"> | 7 <include src="component.js"> |
8 <include src="print_preview_focus_manager.js"> | 8 <include src="print_preview_focus_manager.js"> |
9 | 9 |
10 cr.define('print_preview', function() { | 10 cr.define('print_preview', function() { |
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
956 onManageCloudDestinationsActivated_: function() { | 956 onManageCloudDestinationsActivated_: function() { |
957 this.nativeLayer_.startManageCloudDestinations(this.userInfo_.activeUser); | 957 this.nativeLayer_.startManageCloudDestinations(this.userInfo_.activeUser); |
958 }, | 958 }, |
959 | 959 |
960 /** | 960 /** |
961 * Called when the destination search dispatches manage local destinations | 961 * Called when the destination search dispatches manage local destinations |
962 * event. Calls corresponding native layer method. | 962 * event. Calls corresponding native layer method. |
963 * @private | 963 * @private |
964 */ | 964 */ |
965 onManageLocalDestinationsActivated_: function() { | 965 onManageLocalDestinationsActivated_: function() { |
966 if (cr.isChromeOS && loadTimeData.getBoolean('showLocalManageButton')) { | |
Dan Beam
2016/09/21 20:56:25
if (loadTimeData.valueExists('localPrintersManagem
dpapad
2016/09/21 20:58:23
I think the confusing part is here. Why would this
xdai1
2016/09/21 23:38:53
You're right that we won't get the event in the fi
dpapad
2016/09/22 00:18:15
That looks fine. Alternatively, we could just do t
| |
967 window.open(loadTimeData.getString('localPrintersManagementURL')); | |
968 return; | |
969 } | |
966 this.nativeLayer_.startManageLocalDestinations(); | 970 this.nativeLayer_.startManageLocalDestinations(); |
967 }, | 971 }, |
968 | 972 |
969 /** | 973 /** |
970 * Called when the user wants to sign in to Google Cloud Print. Calls the | 974 * Called when the user wants to sign in to Google Cloud Print. Calls the |
971 * corresponding native layer event. | 975 * corresponding native layer event. |
972 * @param {boolean} addAccount Whether to open an 'add a new account' or | 976 * @param {boolean} addAccount Whether to open an 'add a new account' or |
973 * default sign in page. | 977 * default sign in page. |
974 * @private | 978 * @private |
975 */ | 979 */ |
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1311 <include src="search/recent_destination_list.js"> | 1315 <include src="search/recent_destination_list.js"> |
1312 <include src="search/destination_list_item.js"> | 1316 <include src="search/destination_list_item.js"> |
1313 <include src="search/destination_search.js"> | 1317 <include src="search/destination_search.js"> |
1314 <include src="search/fedex_tos.js"> | 1318 <include src="search/fedex_tos.js"> |
1315 <include src="search/provisional_destination_resolver.js"> | 1319 <include src="search/provisional_destination_resolver.js"> |
1316 | 1320 |
1317 window.addEventListener('DOMContentLoaded', function() { | 1321 window.addEventListener('DOMContentLoaded', function() { |
1318 printPreview = new print_preview.PrintPreview(); | 1322 printPreview = new print_preview.PrintPreview(); |
1319 printPreview.initialize(); | 1323 printPreview.initialize(); |
1320 }); | 1324 }); |
OLD | NEW |