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

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

Issue 822663003: Conform selector used in focus manager of history to <cr-menu> element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 var FocusManager = cr.ui.FocusManager; 5 var FocusManager = cr.ui.FocusManager;
6 6
7 /** 7 /**
8 * A history-specific FocusManager implementation, which ensures that elements 8 * A history-specific FocusManager implementation, which ensures that elements
9 * "background" pages (i.e., those in a dialog that is not the topmost overlay) 9 * "background" pages (i.e., those in a dialog that is not the topmost overlay)
10 * do not receive focus. 10 * do not receive focus.
11 * @constructor 11 * @constructor
12 * @extends {cr.ui.FocusManager} 12 * @extends {cr.ui.FocusManager}
13 */ 13 */
14 function HistoryFocusManager() { 14 function HistoryFocusManager() {
15 } 15 }
16 16
17 cr.addSingletonGetter(HistoryFocusManager); 17 cr.addSingletonGetter(HistoryFocusManager);
18 18
19 HistoryFocusManager.prototype = { 19 HistoryFocusManager.prototype = {
20 __proto__: FocusManager.prototype, 20 __proto__: FocusManager.prototype,
21 21
22 /** @override */ 22 /** @override */
23 getFocusParent: function() { 23 getFocusParent: function() {
24 return document.querySelector('#overlay .showing') || 24 return document.querySelector('#overlay .showing') ||
25 document.querySelector('menu:not([hidden])') || 25 document.querySelector('cr-menu:not([hidden])') ||
26 $('history-page'); 26 $('history-page');
27 }, 27 },
28 }; 28 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698