Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6939)

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_views.cc

Issue 10534153: Use OmniboxViewViews on Win with --enable-views-textfield. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ignore Patch Set 3; use static bool in UseOmniboxViews(). Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_views.h ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_views.cc b/chrome/browser/ui/views/omnibox/omnibox_views.cc
new file mode 100755
index 0000000000000000000000000000000000000000..ec65f0f4f25e39775f933de18df902a057178097
--- /dev/null
+++ b/chrome/browser/ui/views/omnibox/omnibox_views.cc
@@ -0,0 +1,32 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/views/omnibox/omnibox_views.h"
+
+#include "base/command_line.h"
+#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
+#include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
+#include "ui/base/ui_base_switches.h"
+
+#if defined(OS_WIN) && !defined(USE_AURA)
+#include "chrome/browser/ui/views/omnibox/omnibox_view_win.h"
+#endif
+
+OmniboxView* CreateOmniboxView(AutocompleteEditController* controller,
+ ToolbarModel* toolbar_model,
+ Profile* profile,
+ CommandUpdater* command_updater,
+ bool popup_window_mode,
+ LocationBarView* location_bar) {
+#if defined(OS_WIN) && !defined(USE_AURA)
+ CommandLine* command_line = CommandLine::ForCurrentProcess();
+ if (!command_line->HasSwitch(switches::kEnableViewsTextfield))
+ return new OmniboxViewWin(controller, toolbar_model, location_bar,
+ command_updater, popup_window_mode, location_bar);
+#endif
+ OmniboxViewViews* omnibox = new OmniboxViewViews(controller, toolbar_model,
+ profile, command_updater, popup_window_mode, location_bar);
+ omnibox->Init();
+ return omnibox;
+}
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_views.h ('k') | chrome/browser/ui/views/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698