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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/omnibox/omnibox_edit_controller.h" 8 #include "chrome/browser/ui/omnibox/omnibox_edit_controller.h"
9 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" 9 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
10 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h" 10 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
(...skipping 19 matching lines...) Expand all
30 #if defined(OS_WIN) && !defined(USE_AURA) 30 #if defined(OS_WIN) && !defined(USE_AURA)
31 OmniboxViewWin* GetOmniboxViewWin(OmniboxView* view) { 31 OmniboxViewWin* GetOmniboxViewWin(OmniboxView* view) {
32 return UseOmniboxViews() ? NULL : static_cast<OmniboxViewWin*>(view); 32 return UseOmniboxViews() ? NULL : static_cast<OmniboxViewWin*>(view);
33 } 33 }
34 #endif 34 #endif
35 35
36 OmniboxView* CreateOmniboxView(OmniboxEditController* controller, 36 OmniboxView* CreateOmniboxView(OmniboxEditController* controller,
37 ToolbarModel* toolbar_model, 37 ToolbarModel* toolbar_model,
38 Profile* profile, 38 Profile* profile,
39 CommandUpdater* command_updater, 39 CommandUpdater* command_updater,
40 bool popup_window_mode, 40 OmniboxWindowMode window_mode,
41 LocationBarView* location_bar, 41 LocationBarView* location_bar,
42 views::View* popup_parent_view) { 42 views::View* popup_parent_view) {
43
44 // TODO(robertshield): Duplicating the enums is ugly. Ask sky@ about a nicer
45 // way of organizing this.
46 OmniboxView::WindowMode omnibox_window_mode =
47 (window_mode == OMNIBOX_WINDOW_MODE_NORMAL) ? OmniboxView::NORMAL :
48 (window_mode == OMNIBOX_WINDOW_MODE_POPUP) ? OmniboxView::POPUP :
49 OmniboxView::DISABLED;
50
43 #if defined(OS_WIN) && !defined(USE_AURA) 51 #if defined(OS_WIN) && !defined(USE_AURA)
44 if (!UseOmniboxViews()) 52 if (!UseOmniboxViews())
45 return new OmniboxViewWin(controller, toolbar_model, location_bar, 53 return new OmniboxViewWin(controller, toolbar_model, location_bar,
46 command_updater, popup_window_mode, location_bar, 54 command_updater, omnibox_window_mode,
47 popup_parent_view); 55 location_bar, popup_parent_view);
48 #endif 56 #endif
49 OmniboxViewViews* omnibox = new OmniboxViewViews(controller, toolbar_model, 57 OmniboxViewViews* omnibox = new OmniboxViewViews(controller, toolbar_model,
50 profile, command_updater, popup_window_mode, location_bar); 58 profile, command_updater, omnibox_window_mode, location_bar);
51 omnibox->Init(popup_parent_view); 59 omnibox->Init(popup_parent_view);
52 return omnibox; 60 return omnibox;
53 } 61 }
OLDNEW
« 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