| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 ev_bubble_view_->set_drag_controller(this); | 196 ev_bubble_view_->set_drag_controller(this); |
| 197 | 197 |
| 198 // URL edit field. | 198 // URL edit field. |
| 199 // View container for URL edit field. | 199 // View container for URL edit field. |
| 200 location_entry_.reset(OmniboxView::CreateOmniboxView( | 200 location_entry_.reset(OmniboxView::CreateOmniboxView( |
| 201 this, | 201 this, |
| 202 model_, | 202 model_, |
| 203 profile_, | 203 profile_, |
| 204 command_updater_, | 204 command_updater_, |
| 205 mode_ == POPUP, | 205 mode_ == POPUP, |
| 206 height, |
| 206 this)); | 207 this)); |
| 207 SetLocationEntryFocusable(true); | 208 SetLocationEntryFocusable(true); |
| 208 | 209 |
| 209 location_entry_view_ = location_entry_->AddToView(this); | 210 location_entry_view_ = location_entry_->AddToView(this); |
| 210 location_entry_view_->set_id(VIEW_ID_AUTOCOMPLETE); | 211 location_entry_view_->set_id(VIEW_ID_AUTOCOMPLETE); |
| 211 | 212 |
| 212 selected_keyword_view_ = new SelectedKeywordView( | 213 selected_keyword_view_ = new SelectedKeywordView( |
| 213 kSelectedKeywordBackgroundImages, IDR_KEYWORD_SEARCH_MAGNIFIER, | 214 kSelectedKeywordBackgroundImages, IDR_KEYWORD_SEARCH_MAGNIFIER, |
| 214 GetColor(ToolbarModel::NONE, TEXT), profile_); | 215 GetColor(ToolbarModel::NONE, TEXT), profile_); |
| 215 AddChildView(selected_keyword_view_); | 216 AddChildView(selected_keyword_view_); |
| (...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1281 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && | 1282 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && |
| 1282 !suggested_text_view_->text().empty(); | 1283 !suggested_text_view_->text().empty(); |
| 1283 } | 1284 } |
| 1284 | 1285 |
| 1285 #if !defined(USE_AURA) | 1286 #if !defined(USE_AURA) |
| 1286 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { | 1287 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { |
| 1287 return static_cast<OmniboxViewWin*>(location_entry_.get()); | 1288 return static_cast<OmniboxViewWin*>(location_entry_.get()); |
| 1288 } | 1289 } |
| 1289 #endif | 1290 #endif |
| 1290 #endif | 1291 #endif |
| OLD | NEW |