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

Side by Side Diff: views/controls/textfield/native_textfield_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 "views/controls/textfield/native_textfield_views.h" 5 #include "views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after
697 skip_input_method_cancel_composition_ = false; 697 skip_input_method_cancel_composition_ = false;
698 UpdateAfterChange(true, true); 698 UpdateAfterChange(true, true);
699 OnAfterUserAction(); 699 OnAfterUserAction();
700 } 700 }
701 701
702 ui::TextInputType NativeTextfieldViews::GetTextInputType() { 702 ui::TextInputType NativeTextfieldViews::GetTextInputType() {
703 if (textfield_->read_only() || !textfield_->IsEnabled()) 703 if (textfield_->read_only() || !textfield_->IsEnabled())
704 return ui::TEXT_INPUT_TYPE_NONE; 704 return ui::TEXT_INPUT_TYPE_NONE;
705 else if (textfield_->IsPassword()) 705 else if (textfield_->IsPassword())
706 return ui::TEXT_INPUT_TYPE_PASSWORD; 706 return ui::TEXT_INPUT_TYPE_PASSWORD;
707 else if (textfield_->IsUrl())
708 return ui::TEXT_INPUT_TYPE_URL;
707 return ui::TEXT_INPUT_TYPE_TEXT; 709 return ui::TEXT_INPUT_TYPE_TEXT;
708 } 710 }
709 711
710 gfx::Rect NativeTextfieldViews::GetCaretBounds() { 712 gfx::Rect NativeTextfieldViews::GetCaretBounds() {
711 return GetRenderText()->GetUpdatedCursorBounds(); 713 return GetRenderText()->GetUpdatedCursorBounds();
712 } 714 }
713 715
714 bool NativeTextfieldViews::HasCompositionText() { 716 bool NativeTextfieldViews::HasCompositionText() {
715 return model_->HasCompositionText(); 717 return model_->HasCompositionText();
716 } 718 }
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 1051
1050 #if defined(USE_AURA) 1052 #if defined(USE_AURA)
1051 // static 1053 // static
1052 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( 1054 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper(
1053 Textfield* field) { 1055 Textfield* field) {
1054 return new NativeTextfieldViews(field); 1056 return new NativeTextfieldViews(field);
1055 } 1057 }
1056 #endif 1058 #endif
1057 1059
1058 } // namespace views 1060 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698