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

Side by Side Diff: chrome/browser/resources/extensions/extension_focus_manager.js

Issue 10444100: Implements a focus manager for the extensions page. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Changed getFocusParent() to a public function. Created 8 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
« no previous file with comments | « no previous file | chrome/browser/resources/extensions/extensions.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 cr.define('extensions', function() {
6 var FocusManager = cr.ui.FocusManager;
7
8 function ExtensionFocusManager() {
9 }
10
11 cr.addSingletonGetter(ExtensionFocusManager);
12
13 ExtensionFocusManager.prototype = {
14 __proto__: FocusManager.prototype,
15
16 /**
17 * Returns the parent element containing all elements which should be
18 * allowed to receive focus.
19 * @return {Element} The element containing focusable elements.
20 */
21 getFocusParent: function() {
22 var overlay = extensions.ExtensionSettings.getCurrentOverlay();
23 return overlay ? overlay : $('extension-settings');
Evan Stade 2012/05/31 17:02:00 you can just do return overlay || $('extension-
Kyle Horimoto 2012/06/01 00:02:43 Done.
24 },
25 };
26
27 return {
28 ExtensionFocusManager: ExtensionFocusManager,
29 };
30 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/extensions/extensions.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698