blob: 6e9b078f302ded21bcaa1f37875e340220b2af46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
cr.define('extensions', function() {
/**
* @param {!Element} root
* @param {Node} boundary
* @constructor
* @extends {cr.ui.FocusRow}
*/
function FocusRow(root, boundary) {
cr.ui.FocusRow.call(this, root, boundary);
}
FocusRow.prototype = {
__proto__: cr.ui.FocusRow.prototype,
/** @override */
makeActive: function(active) {
cr.ui.FocusRow.prototype.makeActive.call(this, active);
// Only highlight if the row has focus.
this.root.classList.toggle('extension-highlight',
active && this.root.contains(document.activeElement));
},
};
return {FocusRow: FocusRow};
});
|