| 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/omnibox/omnibox_view_views.h" | 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 // Tell the model to reset itself. | 295 // Tell the model to reset itself. |
| 296 model_->OnKillFocus(); | 296 model_->OnKillFocus(); |
| 297 controller_->OnKillFocus(); | 297 controller_->OnKillFocus(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 void OmniboxViewViews::SetLocationEntryFocusable(bool focusable) { | 300 void OmniboxViewViews::SetLocationEntryFocusable(bool focusable) { |
| 301 textfield_->set_focusable(focusable); | 301 textfield_->set_focusable(focusable); |
| 302 } | 302 } |
| 303 | 303 |
| 304 bool OmniboxViewViews::IsLocationEntryFocusableInRootView() const { | 304 bool OmniboxViewViews::IsLocationEntryFocusableInRootView() const { |
| 305 return textfield_->IsFocusableInRootView(); | 305 return textfield_->IsFocusable(); |
| 306 } | 306 } |
| 307 | 307 |
| 308 //////////////////////////////////////////////////////////////////////////////// | 308 //////////////////////////////////////////////////////////////////////////////// |
| 309 // OmniboxViewViews, views::View implementation: | 309 // OmniboxViewViews, views::View implementation: |
| 310 void OmniboxViewViews::Layout() { | 310 void OmniboxViewViews::Layout() { |
| 311 gfx::Insets insets = GetInsets(); | 311 gfx::Insets insets = GetInsets(); |
| 312 textfield_->SetBounds(insets.left(), insets.top(), | 312 textfield_->SetBounds(insets.left(), insets.top(), |
| 313 width() - insets.width(), | 313 width() - insets.width(), |
| 314 height() - insets.height()); | 314 height() - insets.height()); |
| 315 } | 315 } |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 769 OmniboxViewViews* omnibox_view = new OmniboxViewViews(controller, | 769 OmniboxViewViews* omnibox_view = new OmniboxViewViews(controller, |
| 770 toolbar_model, | 770 toolbar_model, |
| 771 profile, | 771 profile, |
| 772 command_updater, | 772 command_updater, |
| 773 popup_window_mode, | 773 popup_window_mode, |
| 774 location_bar); | 774 location_bar); |
| 775 omnibox_view->Init(); | 775 omnibox_view->Init(); |
| 776 return omnibox_view; | 776 return omnibox_view; |
| 777 } | 777 } |
| 778 #endif | 778 #endif |
| OLD | NEW |