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

Unified Diff: chrome/browser/tab_contents/tab_contents_view_mac.mm

Issue 99245: Fixes the implementation of TabContentsViewMac::TakeFocus(). (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/tab_contents_view_mac.mm
===================================================================
--- chrome/browser/tab_contents/tab_contents_view_mac.mm (revision 14963)
+++ chrome/browser/tab_contents/tab_contents_view_mac.mm (working copy)
@@ -126,8 +126,14 @@
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) {
- [cocoa_view_.get() becomeFirstResponder];
+ if (reverse) {
+ [[cocoa_view_ window] selectPreviousKeyView:cocoa_view_.get()];
+ } else {
+ [[cocoa_view_ window] selectNextKeyView:cocoa_view_.get()];
+ }
}
void TabContentsViewMac::HandleKeyboardEvent(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698