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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_views.cc

Issue 10580039: Adds ability to render omnibox as a view above the page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/omnibox/omnibox_views.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_views.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
9 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 9 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
10 #include "ui/base/ui_base_switches.h" 10 #include "ui/base/ui_base_switches.h"
11 11
12 #if defined(OS_WIN) && !defined(USE_AURA) 12 #if defined(OS_WIN) && !defined(USE_AURA)
13 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" 13 #include "chrome/browser/ui/views/omnibox/omnibox_view_win.h"
14 #endif 14 #endif
15 15
16 OmniboxView* CreateOmniboxView(AutocompleteEditController* controller, 16 OmniboxView* CreateOmniboxView(AutocompleteEditController* controller,
17 ToolbarModel* toolbar_model, 17 ToolbarModel* toolbar_model,
18 Profile* profile, 18 Profile* profile,
19 CommandUpdater* command_updater, 19 CommandUpdater* command_updater,
20 bool popup_window_mode, 20 bool popup_window_mode,
21 LocationBarView* location_bar) { 21 LocationBarView* location_bar,
22 views::View* popup_parent_view) {
22 #if defined(OS_WIN) && !defined(USE_AURA) 23 #if defined(OS_WIN) && !defined(USE_AURA)
23 CommandLine* command_line = CommandLine::ForCurrentProcess(); 24 CommandLine* command_line = CommandLine::ForCurrentProcess();
24 if (!command_line->HasSwitch(switches::kEnableViewsTextfield)) 25 if (!command_line->HasSwitch(switches::kEnableViewsTextfield))
25 return new OmniboxViewWin(controller, toolbar_model, location_bar, 26 return new OmniboxViewWin(controller, toolbar_model, location_bar,
26 command_updater, popup_window_mode, location_bar); 27 command_updater, popup_window_mode, location_bar,
28 popup_parent_view);
27 #endif 29 #endif
28 OmniboxViewViews* omnibox = new OmniboxViewViews(controller, toolbar_model, 30 OmniboxViewViews* omnibox = new OmniboxViewViews(controller, toolbar_model,
29 profile, command_updater, popup_window_mode, location_bar); 31 profile, command_updater, popup_window_mode, location_bar);
30 omnibox->Init(); 32 omnibox->Init(popup_parent_view);
31 return omnibox; 33 return omnibox;
32 } 34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698