diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 14:52:00 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-30 14:52:00 +0000 |
commit | 900e7368646c6d45d62df9eb03f252cfacdf6111 (patch) | |
tree | c1da90d6d46a18aeac3ac94dc82cfc395ec7942b | |
parent | 9a136cdf89222c11b0dae86e19ff0b14956f929a (diff) | |
download | chromium_src-900e7368646c6d45d62df9eb03f252cfacdf6111.zip chromium_src-900e7368646c6d45d62df9eb03f252cfacdf6111.tar.gz chromium_src-900e7368646c6d45d62df9eb03f252cfacdf6111.tar.bz2 |
Minimal SetInitialFocus and RestoreFocus. These aren't final, but this
does resolve the location bar not being focused bug on the mac build.
Patch by Sean Bryant (sean@cyberwang.net).
BUG=9419
Review URL: http://codereview.chromium.org/100140
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14939 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents_view_mac.mm | 6 |
2 files changed, 6 insertions, 1 deletions
@@ -34,3 +34,4 @@ Paul Robinson <paulrobinson85@googlemail.com> Josué Ratelle <jorat1346@gmail.com> Edward Crossman <tedoc2000@gmail.com> Nikita Ofitserov <himikof@gmail.com> +Sean Bryant <sean@cyberwang.net> diff --git a/chrome/browser/tab_contents/tab_contents_view_mac.mm b/chrome/browser/tab_contents/tab_contents_view_mac.mm index 3d894c8..bcf7ab4 100644 --- a/chrome/browser/tab_contents/tab_contents_view_mac.mm +++ b/chrome/browser/tab_contents/tab_contents_view_mac.mm @@ -107,7 +107,9 @@ void TabContentsViewMac::Focus() { } 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::StoreFocus() { 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) { |