Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: chrome/browser/resources/print_preview/print_preview.js

Issue 171763004: Remove pp_ifdef from resource files in chrome/browser and chrome/renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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">
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.
734 this.close_(); 733 this.close_();
735 // </if> 734 </if>
736 } 735 }
737 e.preventDefault(); 736 e.preventDefault();
738 return; 737 return;
739 } 738 }
740 739
741 // Ctrl + Shift + p / Mac equivalent. 740 // Ctrl + Shift + p / Mac equivalent.
742 if (e.keyCode == 80) { 741 if (e.keyCode == 80) {
743 if ((cr.isMac && e.metaKey && e.altKey && !e.shiftKey && !e.ctrlKey) || 742 if ((cr.isMac && e.metaKey && e.altKey && !e.shiftKey && !e.ctrlKey) ||
744 (!cr.isMac && e.shiftKey && e.ctrlKey && !e.altKey && !e.metaKey)) { 743 (!cr.isMac && e.shiftKey && e.ctrlKey && !e.altKey && !e.metaKey)) {
745 this.openSystemPrintDialog_(); 744 this.openSystemPrintDialog_();
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 <include src="search/recent_destination_list.js"/> 974 <include src="search/recent_destination_list.js"/>
976 <include src="search/destination_list_item.js"/> 975 <include src="search/destination_list_item.js"/>
977 <include src="search/destination_search.js"/> 976 <include src="search/destination_search.js"/>
978 <include src="search/search_box.js"/> 977 <include src="search/search_box.js"/>
979 <include src="search/fedex_tos.js"/> 978 <include src="search/fedex_tos.js"/>
980 979
981 window.addEventListener('DOMContentLoaded', function() { 980 window.addEventListener('DOMContentLoaded', function() {
982 printPreview = new print_preview.PrintPreview(); 981 printPreview = new print_preview.PrintPreview();
983 printPreview.initialize(); 982 printPreview.initialize();
984 }); 983 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/print_preview/print_preview.css ('k') | chrome/renderer/resources/plugin_placeholders.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698