| 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 <include src="print_preview_focus_manager.js"/> | 10 <include src="print_preview_focus_manager.js"/> |
| (...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 848 // instead of JS-side. | 848 // instead of JS-side. |
| 849 return; | 849 return; |
| 850 </if> | 850 </if> |
| 851 <if expr="not toolkit_views"> | 851 <if expr="not toolkit_views"> |
| 852 this.close_(); | 852 this.close_(); |
| 853 </if> | 853 </if> |
| 854 e.preventDefault(); | 854 e.preventDefault(); |
| 855 return; | 855 return; |
| 856 } | 856 } |
| 857 | 857 |
| 858 // On Mac, Cmd- should close the print dialog. |
| 859 if (cr.isMac && e.keyCode == 189 && e.metaKey) { |
| 860 this.close_(); |
| 861 e.preventDefault(); |
| 862 return; |
| 863 } |
| 864 |
| 858 // Ctrl + Shift + p / Mac equivalent. | 865 // Ctrl + Shift + p / Mac equivalent. |
| 859 if (e.keyCode == 80) { | 866 if (e.keyCode == 80) { |
| 860 if ((cr.isMac && e.metaKey && e.altKey && !e.shiftKey && !e.ctrlKey) || | 867 if ((cr.isMac && e.metaKey && e.altKey && !e.shiftKey && !e.ctrlKey) || |
| 861 (!cr.isMac && e.shiftKey && e.ctrlKey && !e.altKey && !e.metaKey)) { | 868 (!cr.isMac && e.shiftKey && e.ctrlKey && !e.altKey && !e.metaKey)) { |
| 862 this.openSystemPrintDialog_(); | 869 this.openSystemPrintDialog_(); |
| 863 e.preventDefault(); | 870 e.preventDefault(); |
| 864 return; | 871 return; |
| 865 } | 872 } |
| 866 } | 873 } |
| 867 | 874 |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 <include src="search/cloud_destination_list.js"/> | 1284 <include src="search/cloud_destination_list.js"/> |
| 1278 <include src="search/recent_destination_list.js"/> | 1285 <include src="search/recent_destination_list.js"/> |
| 1279 <include src="search/destination_list_item.js"/> | 1286 <include src="search/destination_list_item.js"/> |
| 1280 <include src="search/destination_search.js"/> | 1287 <include src="search/destination_search.js"/> |
| 1281 <include src="search/fedex_tos.js"/> | 1288 <include src="search/fedex_tos.js"/> |
| 1282 | 1289 |
| 1283 window.addEventListener('DOMContentLoaded', function() { | 1290 window.addEventListener('DOMContentLoaded', function() { |
| 1284 printPreview = new print_preview.PrintPreview(); | 1291 printPreview = new print_preview.PrintPreview(); |
| 1285 printPreview.initialize(); | 1292 printPreview.initialize(); |
| 1286 }); | 1293 }); |
| OLD | NEW |