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

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

Issue 10928199: Add ExtendSelectionAndDelete() method to ui::TextInputClient. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/textfield/native_textfield_views.h" 5 #include "ui/views/controls/textfield/native_textfield_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 void NativeTextfieldViews::OnInputMethodChanged() { 846 void NativeTextfieldViews::OnInputMethodChanged() {
847 NOTIMPLEMENTED(); 847 NOTIMPLEMENTED();
848 } 848 }
849 849
850 bool NativeTextfieldViews::ChangeTextDirectionAndLayoutAlignment( 850 bool NativeTextfieldViews::ChangeTextDirectionAndLayoutAlignment(
851 base::i18n::TextDirection direction) { 851 base::i18n::TextDirection direction) {
852 NOTIMPLEMENTED(); 852 NOTIMPLEMENTED();
853 return false; 853 return false;
854 } 854 }
855 855
856 void NativeTextfieldViews::ExtendSelectionAndDelete(int before, int after) {
857 // TODO(horo): implement this method if it is required.
858 // http://crbug.com/149155
859 NOTIMPLEMENTED();
860 }
861
856 void NativeTextfieldViews::OnCompositionTextConfirmedOrCleared() { 862 void NativeTextfieldViews::OnCompositionTextConfirmedOrCleared() {
857 if (skip_input_method_cancel_composition_) 863 if (skip_input_method_cancel_composition_)
858 return; 864 return;
859 DCHECK(textfield_->GetInputMethod()); 865 DCHECK(textfield_->GetInputMethod());
860 textfield_->GetInputMethod()->CancelComposition(textfield_); 866 textfield_->GetInputMethod()->CancelComposition(textfield_);
861 } 867 }
862 868
863 gfx::RenderText* NativeTextfieldViews::GetRenderText() const { 869 gfx::RenderText* NativeTextfieldViews::GetRenderText() const {
864 return model_->render_text(); 870 return model_->render_text();
865 } 871 }
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 // Filter out all control characters, including tab and new line characters, 1224 // Filter out all control characters, including tab and new line characters,
1219 // and all characters with Alt modifier. But we need to allow characters with 1225 // and all characters with Alt modifier. But we need to allow characters with
1220 // AltGr modifier. 1226 // AltGr modifier.
1221 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different 1227 // On Windows AltGr is represented by Alt+Ctrl, and on Linux it's a different
1222 // flag that we don't care about. 1228 // flag that we don't care about.
1223 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) && 1229 return ((ch >= 0x20 && ch < 0x7F) || ch > 0x9F) &&
1224 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN; 1230 (flags & ~(ui::EF_SHIFT_DOWN | ui::EF_CAPS_LOCK_DOWN)) != ui::EF_ALT_DOWN;
1225 } 1231 }
1226 1232
1227 } // namespace views 1233 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698