diff options
author | ygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 16:46:29 +0000 |
---|---|---|
committer | ygorshenin@chromium.org <ygorshenin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-11-01 16:46:29 +0000 |
commit | a18a7ebb718206f6242ad81f4446414ba75bc6c2 (patch) | |
tree | df9d08af5dec58efbac423c84105dfd17088d4e3 /chrome/browser/resources/help/help_focus_manager.js | |
parent | 4a58c42d044631d9ca3e1f80747e3089a8a87c05 (diff) | |
download | chromium_src-a18a7ebb718206f6242ad81f4446414ba75bc6c2.zip chromium_src-a18a7ebb718206f6242ad81f4446414ba75bc6c2.tar.gz chromium_src-a18a7ebb718206f6242ad81f4446414ba75bc6c2.tar.bz2 |
Fixed {overlay|focus|scrolling} handling on the help page.
BUG=305736
TEST=manual tests on Linux ChromeOS build.
Review URL: https://codereview.chromium.org/50853002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232414 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/help/help_focus_manager.js')
-rw-r--r-- | chrome/browser/resources/help/help_focus_manager.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/resources/help/help_focus_manager.js b/chrome/browser/resources/help/help_focus_manager.js new file mode 100644 index 0000000..335f8fd --- /dev/null +++ b/chrome/browser/resources/help/help_focus_manager.js @@ -0,0 +1,27 @@ +// Copyright 2013 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. + +// Helper class for help page, that controls focus transition between +// elements on the help page and overlays. +cr.define('help', function() { + function HelpFocusManager() { + } + + cr.addSingletonGetter(HelpFocusManager); + + HelpFocusManager.prototype = { + __proto__: cr.ui.FocusManager.prototype, + + getFocusParent: function() { + var page = help.HelpPage.getTopmostVisiblePage(); + if (!page) + return null; + return page.pageDiv; + }, + }; + + return { + HelpFocusManager: HelpFocusManager, + }; +}); |