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

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

Issue 444093003: history: left/right arrow should change focus even when history is read-only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | chrome/test/data/webui/history_browsertest.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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="../uber/uber_utils.js"> 5 <include src="../uber/uber_utils.js">
6 <include src="history_focus_manager.js"> 6 <include src="history_focus_manager.js">
7 7
8 /////////////////////////////////////////////////////////////////////////////// 8 ///////////////////////////////////////////////////////////////////////////////
9 // Globals: 9 // Globals:
10 /** @const */ var RESULTS_PER_PAGE = 150; 10 /** @const */ var RESULTS_PER_PAGE = 150;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 checkbox.id = 'checkbox-' + this.id_; 164 checkbox.id = 'checkbox-' + this.id_;
165 checkbox.time = this.date.getTime(); 165 checkbox.time = this.date.getTime();
166 checkbox.tabIndex = -1; 166 checkbox.tabIndex = -1;
167 checkbox.addEventListener('click', checkboxClicked); 167 checkbox.addEventListener('click', checkboxClicked);
168 entryBox.appendChild(checkbox); 168 entryBox.appendChild(checkbox);
169 169
170 // Clicking anywhere in the entryBox will check/uncheck the checkbox. 170 // Clicking anywhere in the entryBox will check/uncheck the checkbox.
171 entryBox.setAttribute('for', checkbox.id); 171 entryBox.setAttribute('for', checkbox.id);
172 entryBox.addEventListener('mousedown', entryBoxMousedown); 172 entryBox.addEventListener('mousedown', entryBoxMousedown);
173 entryBox.addEventListener('click', entryBoxClick); 173 entryBox.addEventListener('click', entryBoxClick);
174 entryBox.addEventListener('keydown', this.handleKeydown_.bind(this));
175 } 174 }
176 175
176 entryBox.addEventListener('keydown', this.handleKeydown_.bind(this));
177
177 // Keep track of the drop down that triggered the menu, so we know 178 // Keep track of the drop down that triggered the menu, so we know
178 // which element to apply the command to. 179 // which element to apply the command to.
179 // TODO(dubroy): Ideally we'd use 'activate', but MenuButton swallows it. 180 // TODO(dubroy): Ideally we'd use 'activate', but MenuButton swallows it.
180 var setActiveVisit = function(e) { 181 var setActiveVisit = function(e) {
181 activeVisit = self; 182 activeVisit = self;
182 var menu = $('action-menu'); 183 var menu = $('action-menu');
183 menu.dataset.devicename = self.deviceName; 184 menu.dataset.devicename = self.deviceName;
184 menu.dataset.devicetype = self.deviceType; 185 menu.dataset.devicetype = self.deviceType;
185 }; 186 };
186 domain.textContent = this.domain_; 187 domain.textContent = this.domain_;
(...skipping 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2327 historyView.reload(); 2328 historyView.reload();
2328 } 2329 }
2329 2330
2330 // Add handlers to HTML elements. 2331 // Add handlers to HTML elements.
2331 document.addEventListener('DOMContentLoaded', load); 2332 document.addEventListener('DOMContentLoaded', load);
2332 2333
2333 // This event lets us enable and disable menu items before the menu is shown. 2334 // This event lets us enable and disable menu items before the menu is shown.
2334 document.addEventListener('canExecute', function(e) { 2335 document.addEventListener('canExecute', function(e) {
2335 e.canExecute = true; 2336 e.canExecute = true;
2336 }); 2337 });
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/webui/history_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698