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

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

Issue 10630013: Adds LocationBarContainer that contains (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove set_view_to_focus Created 8 years, 6 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/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/toolbar_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index a8d2c7bf2fdde519cebf28e3ed0ada96f88ad215..9612bfc84ad80740028fff8c0de93f62d58941cb 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -171,7 +171,8 @@ LocationBarView::LocationBarView(Profile* profile,
mode_(mode),
show_focus_rect_(false),
template_url_service_(NULL),
- animation_offset_(0) {
+ animation_offset_(0),
+ ALLOW_THIS_IN_INITIALIZER_LIST(view_to_focus_(this)) {
set_id(VIEW_ID_LOCATION_BAR);
if (mode_ == NORMAL) {
@@ -513,14 +514,14 @@ void LocationBarView::SetLocationEntryFocusable(bool focusable) {
if (omnibox_views)
omnibox_views->SetLocationEntryFocusable(focusable);
else
- set_focusable(focusable);
+ view_to_focus_->set_focusable(focusable);
}
bool LocationBarView::IsLocationEntryFocusableInRootView() const {
OmniboxViewViews* omnibox_views = GetOmniboxViewViews(location_entry_.get());
if (omnibox_views)
return omnibox_views->IsLocationEntryFocusableInRootView();
- return views::View::IsFocusable();
+ return view_to_focus_->IsFocusable();
}
gfx::Size LocationBarView::GetPreferredSize() {
@@ -959,7 +960,7 @@ void LocationBarView::OnSetFocus() {
NOTREACHED();
return;
}
- focus_manager->SetFocusedView(this);
+ focus_manager->SetFocusedView(view_to_focus_);
}
SkBitmap LocationBarView::GetFavicon() const {
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698