OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/browser/ui/views/omnibox/omnibox_views.h" |
| 6 |
| 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 9 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" |
| 10 #include "ui/base/ui_base_switches.h" |
| 11 |
| 12 #if defined(OS_WIN) && !defined(USE_AURA) |
| 13 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" |
| 14 #endif |
| 15 |
| 16 OmniboxView* CreateOmniboxView(AutocompleteEditController* controller, |
| 17 ToolbarModel* toolbar_model, |
| 18 Profile* profile, |
| 19 CommandUpdater* command_updater, |
| 20 bool popup_window_mode, |
| 21 LocationBarView* location_bar) { |
| 22 #if defined(OS_WIN) && !defined(USE_AURA) |
| 23 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 24 if (!command_line->HasSwitch(switches::kEnableViewsTextfield)) |
| 25 return new OmniboxViewWin(controller, toolbar_model, location_bar, |
| 26 command_updater, popup_window_mode, location_bar); |
| 27 #endif |
| 28 OmniboxViewViews* omnibox = new OmniboxViewViews(controller, toolbar_model, |
| 29 profile, command_updater, popup_window_mode, location_bar); |
| 30 omnibox->Init(); |
| 31 return omnibox; |
| 32 } |
OLD | NEW |