Chromium Code Reviews| Index: chrome/browser/autocomplete/autocomplete_edit_view_views.cc |
| diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_views.cc b/chrome/browser/autocomplete/autocomplete_edit_view_views.cc |
| index 68e84ec27320340f252fc2d67298f4c9d7ee9dfd..2abad5d81810bf80d7c349bd197d6539a9f90ea4 100644 |
| --- a/chrome/browser/autocomplete/autocomplete_edit_view_views.cc |
| +++ b/chrome/browser/autocomplete/autocomplete_edit_view_views.cc |
| @@ -14,6 +14,7 @@ |
| #include "chrome/browser/command_updater.h" |
| #include "chrome/browser/tab_contents/tab_contents.h" |
| #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h" |
| +#include "chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h" |
| #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| #include "chrome/common/notification_service.h" |
| #include "googleurl/src/gurl.h" |
| @@ -110,8 +111,7 @@ AutocompleteEditViewViews::AutocompleteEditViewViews( |
| bool popup_window_mode, |
| const views::View* location_bar) |
| : model_(new AutocompleteEditModel(this, controller, profile)), |
| - popup_view_(new AutocompletePopupContentsView( |
| - gfx::Font(), this, model_.get(), profile, location_bar)), |
| + popup_view_(CreatePopupView(profile, location_bar)), |
| controller_(controller), |
| toolbar_model_(toolbar_model), |
| command_updater_(command_updater), |
| @@ -641,3 +641,14 @@ void AutocompleteEditViewViews::SelectRange(size_t caret, size_t end) { |
| const views::TextRange range(caret, end); |
| textfield_->SelectRange(range); |
| } |
| + |
| +AutocompletePopupView* AutocompleteEditViewViews::CreatePopupView( |
| + Profile* profile, const views::View* location_bar) { |
|
Peter Kasting
2011/02/17 23:08:57
Nit: One arg per line
varunjain
2011/02/18 00:16:34
Done.
|
| +#if defined(TOUCH_UI) |
| + return new TouchAutocompletePopupContentsView( |
| + gfx::Font(), this, model_.get(), profile, location_bar); |
|
Peter Kasting
2011/02/17 23:08:57
Nit: Why not bring this second line out of the #if
varunjain
2011/02/18 00:16:34
It looked better to me that way... but anyways. Do
|
| +#else |
| + return new AutocompletePopupContentsView( |
| + gfx::Font(), this, model_.get(), profile, location_bar); |
| +#endif |
| +} |