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

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

Issue 2586113002: MD Settings: ignore modified key events in the profile avatar grid (Closed)
Patch Set: closure Created 4 years 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
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 <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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 * Consume escape key presses and ctrl + shift + p. Delegate everything else 896 * Consume escape key presses and ctrl + shift + p. Delegate everything else
897 * to the preview area. 897 * to the preview area.
898 * @param {KeyboardEvent} e The keyboard event. 898 * @param {KeyboardEvent} e The keyboard event.
899 * @private 899 * @private
900 * @suppress {uselessCode} 900 * @suppress {uselessCode}
901 * Current compiler preprocessor leaves all the code inside all the <if>s, 901 * Current compiler preprocessor leaves all the code inside all the <if>s,
902 * so the compiler claims that code after first return is unreachable. 902 * so the compiler claims that code after first return is unreachable.
903 */ 903 */
904 onKeyDown_: function(e) { 904 onKeyDown_: function(e) {
905 // Escape key closes the dialog. 905 // Escape key closes the dialog.
906 if (e.keyCode == 27 && !e.shiftKey && !e.ctrlKey && !e.altKey && 906 if (e.keyCode == 27 && !hasKeyModifiers(e)) {
907 !e.metaKey) {
908 // On non-mac with toolkit-views, ESC key is handled by C++-side instead 907 // On non-mac with toolkit-views, ESC key is handled by C++-side instead
909 // of JS-side. 908 // of JS-side.
910 if (cr.isMac) { 909 if (cr.isMac) {
911 this.close_(); 910 this.close_();
912 e.preventDefault(); 911 e.preventDefault();
913 } 912 }
914 return; 913 return;
915 } 914 }
916 915
917 // On Mac, Cmd-. should close the print dialog. 916 // On Mac, Cmd-. should close the print dialog.
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
1360 <include src="search/recent_destination_list.js"> 1359 <include src="search/recent_destination_list.js">
1361 <include src="search/destination_list_item.js"> 1360 <include src="search/destination_list_item.js">
1362 <include src="search/destination_search.js"> 1361 <include src="search/destination_search.js">
1363 <include src="search/fedex_tos.js"> 1362 <include src="search/fedex_tos.js">
1364 <include src="search/provisional_destination_resolver.js"> 1363 <include src="search/provisional_destination_resolver.js">
1365 1364
1366 window.addEventListener('DOMContentLoaded', function() { 1365 window.addEventListener('DOMContentLoaded', function() {
1367 printPreview = new print_preview.PrintPreview(); 1366 printPreview = new print_preview.PrintPreview();
1368 printPreview.initialize(); 1367 printPreview.initialize();
1369 }); 1368 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698