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

Side by Side Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 7834048: Preliminary work to allow Chrome to build with USE_AURA (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/location_bar/location_bar_view.h" 5 #include "chrome/browser/ui/views/location_bar/location_bar_view.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 ev_bubble_view_ = 169 ev_bubble_view_ =
170 new EVBubbleView(kEVBubbleBackgroundImages, IDR_OMNIBOX_HTTPS_VALID, 170 new EVBubbleView(kEVBubbleBackgroundImages, IDR_OMNIBOX_HTTPS_VALID,
171 GetColor(ToolbarModel::EV_SECURE, SECURITY_TEXT), this); 171 GetColor(ToolbarModel::EV_SECURE, SECURITY_TEXT), this);
172 AddChildView(ev_bubble_view_); 172 AddChildView(ev_bubble_view_);
173 ev_bubble_view_->SetVisible(false); 173 ev_bubble_view_->SetVisible(false);
174 ev_bubble_view_->set_drag_controller(this); 174 ev_bubble_view_->set_drag_controller(this);
175 175
176 // URL edit field. 176 // URL edit field.
177 // View container for URL edit field. 177 // View container for URL edit field.
178 Profile* profile = browser_->profile(); 178 Profile* profile = browser_->profile();
179 #if defined(OS_WIN) 179 #if defined(USE_AURA)
180 OmniboxViewViews* omnibox_view = new OmniboxViewViews(this, model_, profile,
181 browser_->command_updater(), mode_ == POPUP, this);
182 omnibox_view->Init();
183 location_entry_.reset(omnibox_view);
184 #elif defined(OS_WIN)
180 if (views::Widget::IsPureViews()) { 185 if (views::Widget::IsPureViews()) {
181 OmniboxViewViews* omnibox_view = new OmniboxViewViews(this, model_, profile, 186 OmniboxViewViews* omnibox_view = new OmniboxViewViews(this, model_, profile,
182 browser_->command_updater(), mode_ == POPUP, this); 187 browser_->command_updater(), mode_ == POPUP, this);
183 omnibox_view->Init(); 188 omnibox_view->Init();
184 location_entry_.reset(omnibox_view); 189 location_entry_.reset(omnibox_view);
185 } else { 190 } else {
186 location_entry_.reset(new OmniboxViewWin(font_, this, model_, this, 191 location_entry_.reset(new OmniboxViewWin(font_, this, model_, this,
187 GetWidget()->GetNativeView(), browser_->command_updater(), 192 GetWidget()->GetNativeView(), browser_->command_updater(),
188 mode_ == POPUP, this)); 193 mode_ == POPUP, this));
189 } 194 }
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 bool LocationBarView::HasValidSuggestText() const { 1251 bool LocationBarView::HasValidSuggestText() const {
1247 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() && 1252 return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
1248 !suggested_text_view_->GetText().empty(); 1253 !suggested_text_view_->GetText().empty();
1249 } 1254 }
1250 1255
1251 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() { 1256 OmniboxViewWin* LocationBarView::GetOmniboxViewWin() {
1252 CHECK(!views::Widget::IsPureViews()); 1257 CHECK(!views::Widget::IsPureViews());
1253 return static_cast<OmniboxViewWin*>(location_entry_.get()); 1258 return static_cast<OmniboxViewWin*>(location_entry_.get());
1254 } 1259 }
1255 #endif 1260 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/infobars/infobar_view.cc ('k') | chrome/browser/ui/views/notifications/balloon_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698