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 * Component used for searching for a print destination. | 9 * Component used for searching for a print destination. |
10 * This is a modal dialog that allows the user to search and select a | 10 * This is a modal dialog that allows the user to search and select a |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
91 this.addChild(this.recentList_); | 91 this.addChild(this.recentList_); |
92 | 92 |
93 /** | 93 /** |
94 * Destination list containing local destinations. | 94 * Destination list containing local destinations. |
95 * @type {!print_preview.DestinationList} | 95 * @type {!print_preview.DestinationList} |
96 * @private | 96 * @private |
97 */ | 97 */ |
98 this.localList_ = new print_preview.DestinationList( | 98 this.localList_ = new print_preview.DestinationList( |
99 this, | 99 this, |
100 loadTimeData.getString('localDestinationsTitle'), | 100 loadTimeData.getString('localDestinationsTitle'), |
101 cr.isChromeOS ? null : loadTimeData.getString('manage')); | 101 loadTimeData.getString('manage')); |
102 this.addChild(this.localList_); | 102 this.addChild(this.localList_); |
103 | 103 |
104 /** | 104 /** |
105 * Destination list containing cloud destinations. | 105 * Destination list containing cloud destinations. |
106 * @type {!print_preview.DestinationList} | 106 * @type {!print_preview.DestinationList} |
107 * @private | 107 * @private |
108 */ | 108 */ |
109 this.cloudList_ = new print_preview.CloudDestinationList(this); | 109 this.cloudList_ = new print_preview.CloudDestinationList(this); |
110 this.addChild(this.cloudList_); | 110 this.addChild(this.cloudList_); |
111 }; | 111 }; |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
681 cr.dispatchSimpleEvent( | 681 cr.dispatchSimpleEvent( |
682 this, | 682 this, |
683 print_preview.DestinationSearch.EventType.MANAGE_CLOUD_DESTINATIONS); | 683 print_preview.DestinationSearch.EventType.MANAGE_CLOUD_DESTINATIONS); |
684 }, | 684 }, |
685 | 685 |
686 /** | 686 /** |
687 * Called when the manage local printers action is activated. | 687 * Called when the manage local printers action is activated. |
688 * @private | 688 * @private |
689 */ | 689 */ |
690 onManageLocalDestinationsActivated_: function() { | 690 onManageLocalDestinationsActivated_: function() { |
691 if (cr.isChromeOS) { | |
dpapad
2016/09/19 22:21:19
Is this the right place to intercept? How about ad
xdai1
2016/09/19 22:53:40
Do you mean PrintPreview.onManageLocalDestinations
dpapad
2016/09/20 00:03:23
I meant the one in print_preview.js. It seems more
xdai1
2016/09/20 17:31:29
Done.
| |
692 window.open(loadTimeData.getString('localPrintersManagementURL')); | |
693 return; | |
694 } | |
691 cr.dispatchSimpleEvent( | 695 cr.dispatchSimpleEvent( |
692 this, | 696 this, |
693 print_preview.DestinationSearch.EventType.MANAGE_LOCAL_DESTINATIONS); | 697 print_preview.DestinationSearch.EventType.MANAGE_LOCAL_DESTINATIONS); |
694 }, | 698 }, |
695 | 699 |
696 /** | 700 /** |
697 * Called when the "Sign in" link on the Google Cloud Print promo is | 701 * Called when the "Sign in" link on the Google Cloud Print promo is |
698 * activated. | 702 * activated. |
699 * @private | 703 * @private |
700 */ | 704 */ |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
763 onWindowResize_: function() { | 767 onWindowResize_: function() { |
764 this.reflowLists_(); | 768 this.reflowLists_(); |
765 } | 769 } |
766 }; | 770 }; |
767 | 771 |
768 // Export | 772 // Export |
769 return { | 773 return { |
770 DestinationSearch: DestinationSearch | 774 DestinationSearch: DestinationSearch |
771 }; | 775 }; |
772 }); | 776 }); |
OLD | NEW |