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

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

Issue 10928199: Add ExtendSelectionAndDelete() method to ui::TextInputClient. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: reflected the review 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 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "ui/base/events/event_constants.h" 10 #include "ui/base/events/event_constants.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 virtual bool GetTextRange(ui::Range* range) OVERRIDE; 163 virtual bool GetTextRange(ui::Range* range) OVERRIDE;
164 virtual bool GetCompositionTextRange(ui::Range* range) OVERRIDE; 164 virtual bool GetCompositionTextRange(ui::Range* range) OVERRIDE;
165 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE; 165 virtual bool GetSelectionRange(ui::Range* range) OVERRIDE;
166 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE; 166 virtual bool SetSelectionRange(const ui::Range& range) OVERRIDE;
167 virtual bool DeleteRange(const ui::Range& range) OVERRIDE; 167 virtual bool DeleteRange(const ui::Range& range) OVERRIDE;
168 virtual bool GetTextFromRange(const ui::Range& range, 168 virtual bool GetTextFromRange(const ui::Range& range,
169 string16* text) OVERRIDE; 169 string16* text) OVERRIDE;
170 virtual void OnInputMethodChanged() OVERRIDE; 170 virtual void OnInputMethodChanged() OVERRIDE;
171 virtual bool ChangeTextDirectionAndLayoutAlignment( 171 virtual bool ChangeTextDirectionAndLayoutAlignment(
172 base::i18n::TextDirection direction) OVERRIDE; 172 base::i18n::TextDirection direction) OVERRIDE;
173 virtual void ExtendSelectionAndDelete(int before, int after) OVERRIDE;
173 174
174 // Overridden from TextfieldViewsModel::Delegate: 175 // Overridden from TextfieldViewsModel::Delegate:
175 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE; 176 virtual void OnCompositionTextConfirmedOrCleared() OVERRIDE;
176 177
177 // Returns the TextfieldViewsModel's text/cursor/selection rendering model. 178 // Returns the TextfieldViewsModel's text/cursor/selection rendering model.
178 gfx::RenderText* GetRenderText() const; 179 gfx::RenderText* GetRenderText() const;
179 180
180 // Converts |text| according to textfield style, e.g. lower case if 181 // Converts |text| according to textfield style, e.g. lower case if
181 // |textfield_| has STYLE_LOWERCASE style. 182 // |textfield_| has STYLE_LOWERCASE style.
182 string16 GetTextForDisplay(const string16& text); 183 string16 GetTextForDisplay(const string16& text);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 scoped_ptr<views::MenuRunner> context_menu_runner_; 283 scoped_ptr<views::MenuRunner> context_menu_runner_;
283 284
284 scoped_ptr<TouchSelectionController> touch_selection_controller_; 285 scoped_ptr<TouchSelectionController> touch_selection_controller_;
285 286
286 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews); 287 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldViews);
287 }; 288 };
288 289
289 } // namespace views 290 } // namespace views
290 291
291 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_ 292 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698