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

Side by Side Diff: chrome/browser/resources/options2/options_focus_manager.js

Issue 10809005: Options: Rename chrome/browser/resources/options2 -> chrome/browser/resources/options. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix. Created 8 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
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('options', function() {
6 var FocusManager = cr.ui.FocusManager;
7 var OptionsPage = options.OptionsPage;
8
9 function OptionsFocusManager() {
10 }
11
12 cr.addSingletonGetter(OptionsFocusManager);
13
14 OptionsFocusManager.prototype = {
15 __proto__: FocusManager.prototype,
16
17 /** @inheritDoc */
18 getFocusParent: function() {
19 var topPage = OptionsPage.getTopmostVisiblePage().pageDiv;
20
21 // The default page and search page include a search field that is a
22 // sibling of the rest of the page instead of a child. Thus, use the
23 // parent node to allow the search field to receive focus.
24 if (topPage.parentNode.id == 'page-container')
25 return topPage.parentNode;
26
27 return topPage;
28 },
29 };
30
31 return {
32 OptionsFocusManager: OptionsFocusManager,
33 };
34 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/options_bundle.js ('k') | chrome/browser/resources/options2/options_page.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698