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

Side by Side Diff: views/controls/textfield/native_textfield_views.cc

Issue 5966006: Hitting Tab should always move cursor to end of omnibox text. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Mac build. Created 9 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/location_bar/suggested_text_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 bool NativeTextfieldViews::IsIMEComposing() const { 269 bool NativeTextfieldViews::IsIMEComposing() const {
270 return false; 270 return false;
271 } 271 }
272 272
273 void NativeTextfieldViews::GetSelectedRange(TextRange* range) const { 273 void NativeTextfieldViews::GetSelectedRange(TextRange* range) const {
274 model_->GetSelectedRange(range); 274 model_->GetSelectedRange(range);
275 } 275 }
276 276
277 void NativeTextfieldViews::SelectRange(const TextRange& range) { 277 void NativeTextfieldViews::SelectRange(const TextRange& range) {
278 model_->SelectRange(range); 278 model_->SelectRange(range);
279 UpdateCursorBoundsAndTextOffset();
279 SchedulePaint(); 280 SchedulePaint();
280 } 281 }
281 282
282 size_t NativeTextfieldViews::GetCursorPosition() const { 283 size_t NativeTextfieldViews::GetCursorPosition() const {
283 return model_->cursor_pos(); 284 return model_->cursor_pos();
284 } 285 }
285 286
286 bool NativeTextfieldViews::HandleKeyPressed(const views::KeyEvent& e) { 287 bool NativeTextfieldViews::HandleKeyPressed(const views::KeyEvent& e) {
287 Textfield::Controller* controller = textfield_->GetController(); 288 Textfield::Controller* controller = textfield_->GetController();
288 bool handled = false; 289 bool handled = false;
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 } 891 }
891 892
892 void NativeTextfieldViews::TextfieldBorder::SetInsets(int top, 893 void NativeTextfieldViews::TextfieldBorder::SetInsets(int top,
893 int left, 894 int left,
894 int bottom, 895 int bottom,
895 int right) { 896 int right) {
896 insets_.Set(top, left, bottom, right); 897 insets_.Set(top, left, bottom, right);
897 } 898 }
898 899
899 } // namespace views 900 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/suggested_text_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698