| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |