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

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

Issue 2059913002: Remove keyIdentifier usage in chrome/browser/resources/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix chromeos build Created 4 years, 6 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
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 <include src="../synthetic_middleclick.js"> 5 <include src="../synthetic_middleclick.js">
6 <include src="../uber/uber_utils.js"> 6 <include src="../uber/uber_utils.js">
7 <include src="history_focus_manager.js"> 7 <include src="history_focus_manager.js">
8 8
9 /////////////////////////////////////////////////////////////////////////////// 9 ///////////////////////////////////////////////////////////////////////////////
10 // Globals: 10 // Globals:
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 historyView.setSearch(this.domain_); 495 historyView.setSearch(this.domain_);
496 $('search-field').focus(); 496 $('search-field').focus();
497 }; 497 };
498 498
499 /** 499 /**
500 * @param {Event} e A keydown event to handle. 500 * @param {Event} e A keydown event to handle.
501 * @private 501 * @private
502 */ 502 */
503 Visit.prototype.handleKeydown_ = function(e) { 503 Visit.prototype.handleKeydown_ = function(e) {
504 // Delete or Backspace should delete the entry if allowed. 504 // Delete or Backspace should delete the entry if allowed.
505 if (e.keyIdentifier == 'U+0008' || e.keyIdentifier == 'U+007F') 505 if (e.key == 'Backspace' || e.key == 'Delete')
506 this.removeEntryFromHistory_(e); 506 this.removeEntryFromHistory_(e);
507 }; 507 };
508 508
509 /** 509 /**
510 * @param {Event} event A mousedown event. 510 * @param {Event} event A mousedown event.
511 * @private 511 * @private
512 */ 512 */
513 Visit.prototype.handleMousedown_ = function(event) { 513 Visit.prototype.handleMousedown_ = function(event) {
514 // Prevent text selection when shift-clicking to select multiple entries. 514 // Prevent text selection when shift-clicking to select multiple entries.
515 if (event.shiftKey) { 515 if (event.shiftKey) {
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
2404 historyView.reload(); 2404 historyView.reload();
2405 } 2405 }
2406 2406
2407 // Add handlers to HTML elements. 2407 // Add handlers to HTML elements.
2408 document.addEventListener('DOMContentLoaded', load); 2408 document.addEventListener('DOMContentLoaded', load);
2409 2409
2410 // This event lets us enable and disable menu items before the menu is shown. 2410 // This event lets us enable and disable menu items before the menu is shown.
2411 document.addEventListener('canExecute', function(e) { 2411 document.addEventListener('canExecute', function(e) {
2412 e.canExecute = true; 2412 e.canExecute = true;
2413 }); 2413 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/extensions/extension_error.js ('k') | chrome/browser/resources/hotword_audio_verification/main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698