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

Unified Diff: chrome/browser/views/location_bar_view.cc

Issue 231022: Reverting 27113. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 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 | « chrome/browser/views/location_bar_view.h ('k') | views/controls/native/native_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « chrome/browser/views/location_bar_view.h ('k') | views/controls/native/native_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698