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

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

Issue 100140: Minimal SetInitialFocus and RestoreFocus. These aren't final, but this does r... (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 | « AUTHORS ('k') | 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 14899)
+++ chrome/browser/tab_contents/tab_contents_view_mac.mm (working copy)
@@ -107,7 +107,9 @@
}
void TabContentsViewMac::SetInitialFocus() {
- // TODO(port)
+ // TODO(port): Set focus in the else case correctly.
+ if (web_contents()->FocusLocationBarByDefault())
+ web_contents()->delegate()->SetFocusToLocationBar();
}
void TabContentsViewMac::StoreFocus() {
@@ -116,6 +118,8 @@
void TabContentsViewMac::RestoreFocus() {
// TODO(port)
+ // For now just assume we are viewing the tab for the first time.
+ SetInitialFocus();
}
void TabContentsViewMac::UpdateDragCursor(bool is_drop_target) {
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698