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

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

Issue 7826039: Identify the omnibox as a URL field. (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/omnibox/omnibox_view_views.h" 5 #include "chrome/browser/ui/views/omnibox/omnibox_view_views.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 //////////////////////////////////////////////////////////////////////////////// 168 ////////////////////////////////////////////////////////////////////////////////
169 // OmniboxViewViews public: 169 // OmniboxViewViews public:
170 170
171 void OmniboxViewViews::Init() { 171 void OmniboxViewViews::Init() {
172 // The height of the text view is going to change based on the font used. We 172 // The height of the text view is going to change based on the font used. We
173 // don't want to stretch the height, and we want it vertically centered. 173 // don't want to stretch the height, and we want it vertically centered.
174 // TODO(oshima): make sure the above happens with views. 174 // TODO(oshima): make sure the above happens with views.
175 textfield_ = new AutocompleteTextfield(this); 175 textfield_ = new AutocompleteTextfield(this);
176 textfield_->SetController(this); 176 textfield_->SetController(this);
177 textfield_->SetUrl(true);
177 178
178 #if defined(TOUCH_UI) 179 #if defined(TOUCH_UI)
179 textfield_->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont( 180 textfield_->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont(
180 ResourceBundle::LargeFont)); 181 ResourceBundle::LargeFont));
181 #endif 182 #endif
182 183
183 if (popup_window_mode_) 184 if (popup_window_mode_)
184 textfield_->SetReadOnly(true); 185 textfield_->SetReadOnly(true);
185 186
186 // Manually invoke SetBaseColor() because TOOLKIT_VIEWS doesn't observe 187 // Manually invoke SetBaseColor() because TOOLKIT_VIEWS doesn't observe
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 AutocompletePopupView* OmniboxViewViews::CreatePopupView( 696 AutocompletePopupView* OmniboxViewViews::CreatePopupView(
696 View* location_bar) { 697 View* location_bar) {
697 #if defined(TOUCH_UI) 698 #if defined(TOUCH_UI)
698 typedef TouchAutocompletePopupContentsView AutocompleteContentsView; 699 typedef TouchAutocompletePopupContentsView AutocompleteContentsView;
699 #else 700 #else
700 typedef AutocompletePopupContentsView AutocompleteContentsView; 701 typedef AutocompletePopupContentsView AutocompleteContentsView;
701 #endif 702 #endif
702 return new AutocompleteContentsView(gfx::Font(), this, model_.get(), 703 return new AutocompleteContentsView(gfx::Font(), this, model_.get(),
703 location_bar); 704 location_bar);
704 } 705 }
OLDNEW
« no previous file with comments | « no previous file | views/controls/textfield/native_textfield_views.cc » ('j') | views/controls/textfield/textfield.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698