diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-12 01:40:28 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-12 01:40:28 +0000 |
commit | fe4ccbef2c5d92d2fce6d4c2fd49b69248275f9b (patch) | |
tree | 909bc9ca9296cf4d935e222e2011160381eeb38e /chrome/browser/instant | |
parent | 30179058aa633f1052869d75936a09dd8e7b9cf7 (diff) | |
download | chromium_src-fe4ccbef2c5d92d2fce6d4c2fd49b69248275f9b.zip chromium_src-fe4ccbef2c5d92d2fce6d4c2fd49b69248275f9b.tar.gz chromium_src-fe4ccbef2c5d92d2fce6d4c2fd49b69248275f9b.tar.bz2 |
[Macs] Adds a RenderWidgetHostView method to tell the view to take focus only on a mouse down event. This will allow us to click on instant results without dismissing the omnibox popup.
BUG=56385
TEST=No visible impact, yet.
TEST=Should still be able to tab from the omnibox into webpages.
TEST=Clicking on a webpage should transfer focus to the page.
Review URL: http://codereview.chromium.org/3535015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant')
-rw-r--r-- | chrome/browser/instant/instant_loader.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc index 0df775a..f1e7dd3 100644 --- a/chrome/browser/instant/instant_loader.cc +++ b/chrome/browser/instant/instant_loader.cc @@ -638,6 +638,10 @@ TabContents* InstantLoader::ReleasePreviewContents(InstantCommitType type) { if (preview_contents_->GetRenderWidgetHostView()) { preview_contents_->GetRenderWidgetHostView()->GetRenderWidgetHost()-> set_paint_observer(NULL); +#if defined(OS_MACOSX) + preview_contents_->GetRenderWidgetHostView()-> + SetTakesFocusOnlyOnMouseDown(false); +#endif } preview_contents_->set_delegate(NULL); preview_tab_contents_delegate_->Reset(); @@ -700,6 +704,12 @@ void InstantLoader::PreviewPainted() { void InstantLoader::ShowPreview() { if (!ready_) { ready_ = true; +#if defined(OS_MACOSX) + if (preview_contents_->GetRenderWidgetHostView()) { + preview_contents_->GetRenderWidgetHostView()-> + SetTakesFocusOnlyOnMouseDown(true); + } +#endif delegate_->ShowInstantLoader(this); } } |