| 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 <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 Loading... |
| 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 Loading... |
| 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 }); |
| OLD | NEW |