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

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: review comments 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 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 if (GetRenderText()->insert_mode()) 693 if (GetRenderText()->insert_mode())
694 model_->InsertChar(ch); 694 model_->InsertChar(ch);
695 else 695 else
696 model_->ReplaceChar(ch); 696 model_->ReplaceChar(ch);
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 return textfield_->GetTextInputType();
704 return ui::TEXT_INPUT_TYPE_NONE;
705 else if (textfield_->IsPassword())
706 return ui::TEXT_INPUT_TYPE_PASSWORD;
707 return ui::TEXT_INPUT_TYPE_TEXT;
708 } 704 }
709 705
710 gfx::Rect NativeTextfieldViews::GetCaretBounds() { 706 gfx::Rect NativeTextfieldViews::GetCaretBounds() {
711 return GetRenderText()->GetUpdatedCursorBounds(); 707 return GetRenderText()->GetUpdatedCursorBounds();
712 } 708 }
713 709
714 bool NativeTextfieldViews::HasCompositionText() { 710 bool NativeTextfieldViews::HasCompositionText() {
715 return model_->HasCompositionText(); 711 return model_->HasCompositionText();
716 } 712 }
717 713
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 1045
1050 #if defined(USE_AURA) 1046 #if defined(USE_AURA)
1051 // static 1047 // static
1052 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper( 1048 NativeTextfieldWrapper* NativeTextfieldWrapper::CreateWrapper(
1053 Textfield* field) { 1049 Textfield* field) {
1054 return new NativeTextfieldViews(field); 1050 return new NativeTextfieldViews(field);
1055 } 1051 }
1056 #endif 1052 #endif
1057 1053
1058 } // namespace views 1054 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.cc ('k') | views/controls/textfield/native_textfield_views_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698