Index: chrome/browser/views/location_bar_view.cc |
=================================================================== |
--- chrome/browser/views/location_bar_view.cc (revision 27114) |
+++ chrome/browser/views/location_bar_view.cc (working copy) |
@@ -157,8 +157,6 @@ |
location_entry_view_->SetID(VIEW_ID_AUTOCOMPLETE); |
AddChildView(location_entry_view_); |
location_entry_view_->set_focus_view(this); |
- location_entry_view_->set_focus_native_view(location_entry_-> |
- GetFocusNativeView()); |
location_entry_view_->Attach( |
#if defined(OS_WIN) |
location_entry_->m_hWnd |
@@ -292,9 +290,8 @@ |
} |
void LocationBarView::Focus() { |
- // Forward the focus to the NativeViewHost that will focus the right |
- // native-view. |
- location_entry_view_->Focus(); |
+ // Focus the location entry native view. |
+ location_entry_->SetFocus(); |
} |
void LocationBarView::SetProfile(Profile* profile) { |
@@ -420,6 +417,15 @@ |
DoLayout(false); |
} |
+void LocationBarView::OnSetFocus() { |
+ views::FocusManager* focus_manager = GetFocusManager(); |
+ if (!focus_manager) { |
+ NOTREACHED(); |
+ return; |
+ } |
+ focus_manager->SetFocusedView(this); |
+} |
+ |
SkBitmap LocationBarView::GetFavIcon() const { |
DCHECK(delegate_); |
DCHECK(delegate_->GetTabContents()); |