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

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

Issue 10854017: Basic metro snap view omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix chromeos compilation. Created 8 years, 4 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.h » ('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
index 498446f286d956478b59a5bc93bdd827eb92756c..5e3d5c3e4845bd57d013ff864d514f4116006fa0 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_views.cc
@@ -37,17 +37,25 @@ OmniboxView* CreateOmniboxView(OmniboxEditController* controller,
ToolbarModel* toolbar_model,
Profile* profile,
CommandUpdater* command_updater,
- bool popup_window_mode,
+ OmniboxWindowMode window_mode,
LocationBarView* location_bar,
views::View* popup_parent_view) {
+
+ // TODO(robertshield): Duplicating the enums is ugly. Ask sky@ about a nicer
+ // way of organizing this.
+ OmniboxView::WindowMode omnibox_window_mode =
+ (window_mode == OMNIBOX_WINDOW_MODE_NORMAL) ? OmniboxView::NORMAL :
+ (window_mode == OMNIBOX_WINDOW_MODE_POPUP) ? OmniboxView::POPUP :
+ OmniboxView::DISABLED;
+
#if defined(OS_WIN) && !defined(USE_AURA)
if (!UseOmniboxViews())
return new OmniboxViewWin(controller, toolbar_model, location_bar,
- command_updater, popup_window_mode, location_bar,
- popup_parent_view);
+ command_updater, omnibox_window_mode,
+ location_bar, popup_parent_view);
#endif
OmniboxViewViews* omnibox = new OmniboxViewViews(controller, toolbar_model,
- profile, command_updater, popup_window_mode, location_bar);
+ profile, command_updater, omnibox_window_mode, location_bar);
omnibox->Init(popup_parent_view);
return omnibox;
}
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_views.h ('k') | chrome/browser/ui/views/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698