Commit f30ce3b1 authored by rohitrao@chromium.org's avatar rohitrao@chromium.org

Fixes the implementation of TabContentsViewMac::TakeFocus().

Review URL: http://codereview.chromium.org/99245

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14991 0039d316-1c4b-4281-b951-d872f2087c98
parent 1894c450
...@@ -126,8 +126,14 @@ void TabContentsViewMac::UpdateDragCursor(bool is_drop_target) { ...@@ -126,8 +126,14 @@ void TabContentsViewMac::UpdateDragCursor(bool is_drop_target) {
NOTIMPLEMENTED(); NOTIMPLEMENTED();
} }
// This is called when we the renderer asks us to take focus back (i.e., it has
// iterated past the last focusable element on the page).
void TabContentsViewMac::TakeFocus(bool reverse) { void TabContentsViewMac::TakeFocus(bool reverse) {
[cocoa_view_.get() becomeFirstResponder]; if (reverse) {
[[cocoa_view_ window] selectPreviousKeyView:cocoa_view_.get()];
} else {
[[cocoa_view_ window] selectNextKeyView:cocoa_view_.get()];
}
} }
void TabContentsViewMac::HandleKeyboardEvent( void TabContentsViewMac::HandleKeyboardEvent(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment