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 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
717 */ | 717 */ |
718 onKeyDown_: function(e) { | 718 onKeyDown_: function(e) { |
719 // Escape key closes the dialog. | 719 // Escape key closes the dialog. |
720 if (e.keyCode == 27 && !e.shiftKey && !e.ctrlKey && !e.altKey && | 720 if (e.keyCode == 27 && !e.shiftKey && !e.ctrlKey && !e.altKey && |
721 !e.metaKey) { | 721 !e.metaKey) { |
722 if (this.destinationSearch_.getIsVisible()) { | 722 if (this.destinationSearch_.getIsVisible()) { |
723 this.destinationSearch_.setIsVisible(false); | 723 this.destinationSearch_.setIsVisible(false); |
724 this.metrics_.incrementDestinationSearchBucket( | 724 this.metrics_.incrementDestinationSearchBucket( |
725 print_preview.Metrics.DestinationSearchBucket.CANCELED); | 725 print_preview.Metrics.DestinationSearchBucket.CANCELED); |
726 } else { | 726 } else { |
727 // <if expr="pp_ifdef('toolkit_views')"> | 727 // <if expr="toolkit_views"> |
Nico
2014/02/19 01:08:43
wot? Why is this in a comment?
newt (away)
2014/02/19 01:43:15
It's a polyglot? The JS comment just confuses thin
Nico
2014/02/19 01:44:50
Thanks, this is much less confusing now imho.
| |
728 // On the toolkit_views environment, ESC key is handled by C++-side | 728 // On the toolkit_views environment, ESC key is handled by C++-side |
729 // instead of JS-side. | 729 // instead of JS-side. |
730 return; | 730 return; |
731 // </if> | 731 // </if> |
732 // <if expr="not pp_ifdef('toolkit_views')"> | 732 // <if expr="not toolkit_views"> |
733 // Dummy comment to absorb previous line's comment symbol. | 733 // Dummy comment to absorb previous line's comment symbol. |
734 this.close_(); | 734 this.close_(); |
735 // </if> | 735 // </if> |
736 } | 736 } |
737 e.preventDefault(); | 737 e.preventDefault(); |
738 return; | 738 return; |
739 } | 739 } |
740 | 740 |
741 // Ctrl + Shift + p / Mac equivalent. | 741 // Ctrl + Shift + p / Mac equivalent. |
742 if (e.keyCode == 80) { | 742 if (e.keyCode == 80) { |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
975 <include src="search/recent_destination_list.js"/> | 975 <include src="search/recent_destination_list.js"/> |
976 <include src="search/destination_list_item.js"/> | 976 <include src="search/destination_list_item.js"/> |
977 <include src="search/destination_search.js"/> | 977 <include src="search/destination_search.js"/> |
978 <include src="search/search_box.js"/> | 978 <include src="search/search_box.js"/> |
979 <include src="search/fedex_tos.js"/> | 979 <include src="search/fedex_tos.js"/> |
980 | 980 |
981 window.addEventListener('DOMContentLoaded', function() { | 981 window.addEventListener('DOMContentLoaded', function() { |
982 printPreview = new print_preview.PrintPreview(); | 982 printPreview = new print_preview.PrintPreview(); |
983 printPreview.initialize(); | 983 printPreview.initialize(); |
984 }); | 984 }); |
OLD | NEW |