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

Unified Diff: views/controls/textfield/textfield.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, 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
Index: views/controls/textfield/textfield.cc
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc
index 8061126d257cd0d41f57000510b0c9985f041461..df7a4394600fb503b9c2ab50cd019781f8294eba 100644
--- a/views/controls/textfield/textfield.cc
+++ b/views/controls/textfield/textfield.cc
@@ -107,6 +107,17 @@ void Textfield::SetPassword(bool password) {
native_wrapper_->UpdateIsPassword();
}
+bool Textfield::IsUrl() const {
+ return style_ & STYLE_URL;
+}
+
+void Textfield::SetUrl(bool url) {
+ if (url)
+ style_ = static_cast<StyleFlags>(style_ | STYLE_URL);
+ else
+ style_ = static_cast<StyleFlags>(style_ & ~STYLE_URL);
+}
+
void Textfield::SetText(const string16& text) {
text_ = text;
if (native_wrapper_)
« views/controls/textfield/textfield.h ('K') | « views/controls/textfield/textfield.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698