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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 8996009: views: Rename IsFocusableInRootView() to just IsFocusable(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 void LocationBarView::SetLocationEntryFocusable(bool focusable) { 453 void LocationBarView::SetLocationEntryFocusable(bool focusable) {
454 if (views::Widget::IsPureViews()) 454 if (views::Widget::IsPureViews())
455 AsViews(location_entry_.get())->SetLocationEntryFocusable(focusable); 455 AsViews(location_entry_.get())->SetLocationEntryFocusable(focusable);
456 else 456 else
457 set_focusable(focusable); 457 set_focusable(focusable);
458 } 458 }
459 459
460 bool LocationBarView::IsLocationEntryFocusableInRootView() const { 460 bool LocationBarView::IsLocationEntryFocusableInRootView() const {
461 return views::Widget::IsPureViews() ? 461 return views::Widget::IsPureViews() ?
462 AsViews(location_entry_.get())->IsLocationEntryFocusableInRootView() : 462 AsViews(location_entry_.get())->IsLocationEntryFocusableInRootView() :
463 views::View::IsFocusableInRootView(); 463 views::View::IsFocusable();
464 } 464 }
465 465
466 gfx::Size LocationBarView::GetPreferredSize() { 466 gfx::Size LocationBarView::GetPreferredSize() {
467 return gfx::Size(0, GetThemeProvider()->GetBitmapNamed(mode_ == POPUP ? 467 return gfx::Size(0, GetThemeProvider()->GetBitmapNamed(mode_ == POPUP ?
468 IDR_LOCATIONBG_POPUPMODE_CENTER : IDR_LOCATIONBG_C)->height()); 468 IDR_LOCATIONBG_POPUPMODE_CENTER : IDR_LOCATIONBG_C)->height());
469 } 469 }
470 470
471 void LocationBarView::Layout() { 471 void LocationBarView::Layout() {
472 if (!location_entry_.get()) 472 if (!location_entry_.get())
473 return; 473 return;
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 !suggested_text_view_->GetText().empty(); 1249 !suggested_text_view_->GetText().empty();
1250 } 1250 }
1251 1251
1252 #if !defined(USE_AURA) 1252 #if !defined(USE_AURA)
1253 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { 1253 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() {
1254 CHECK(!views::Widget::IsPureViews()); 1254 CHECK(!views::Widget::IsPureViews());
1255 return static_cast<OmniboxViewWin*>(location_entry_.get()); 1255 return static_cast<OmniboxViewWin*>(location_entry_.get());
1256 } 1256 }
1257 #endif 1257 #endif
1258 #endif 1258 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/omnibox/omnibox_view_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698