| Index: chrome/browser/views/location_bar_view.cc
|
| ===================================================================
|
| --- chrome/browser/views/location_bar_view.cc (revision 28006)
|
| +++ chrome/browser/views/location_bar_view.cc (working copy)
|
| @@ -158,8 +158,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
|
| @@ -281,9 +279,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) {
|
| @@ -409,6 +406,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());
|
|
|