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

Side by Side Diff: ui/views/ime/input_method_bridge.cc

Issue 10928199: Add ExtendSelectionAndDelete() method to ui::TextInputClient. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: change int to size_t 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
« no previous file with comments | « ui/views/ime/input_method_bridge.h ('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) 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/ime/input_method_bridge.h" 5 #include "ui/views/ime/input_method_bridge.h"
6 6
7 #include "ui/base/events/event.h" 7 #include "ui/base/events/event.h"
8 #include "ui/base/ime/input_method.h" 8 #include "ui/base/ime/input_method.h"
9 #include "ui/gfx/rect.h" 9 #include "ui/gfx/rect.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 client->OnInputMethodChanged(); 206 client->OnInputMethodChanged();
207 } 207 }
208 208
209 bool InputMethodBridge::ChangeTextDirectionAndLayoutAlignment( 209 bool InputMethodBridge::ChangeTextDirectionAndLayoutAlignment(
210 base::i18n::TextDirection direction) { 210 base::i18n::TextDirection direction) {
211 TextInputClient* client = GetTextInputClient(); 211 TextInputClient* client = GetTextInputClient();
212 return client ? 212 return client ?
213 client->ChangeTextDirectionAndLayoutAlignment(direction) : false; 213 client->ChangeTextDirectionAndLayoutAlignment(direction) : false;
214 } 214 }
215 215
216 void InputMethodBridge::ExtendSelectionAndDelete(size_t before, size_t after) {
217 TextInputClient* client = GetTextInputClient();
218 if (client)
219 client->ExtendSelectionAndDelete(before, after);
220 }
221
216 // Overridden from FocusChangeListener. 222 // Overridden from FocusChangeListener.
217 void InputMethodBridge::OnWillChangeFocus(View* focused_before, View* focused) { 223 void InputMethodBridge::OnWillChangeFocus(View* focused_before, View* focused) {
218 ConfirmCompositionText(); 224 ConfirmCompositionText();
219 } 225 }
220 226
221 void InputMethodBridge::OnDidChangeFocus(View* focused_before, View* focused) { 227 void InputMethodBridge::OnDidChangeFocus(View* focused_before, View* focused) {
222 OnTextInputTypeChanged(GetFocusedView()); 228 OnTextInputTypeChanged(GetFocusedView());
223 OnCaretBoundsChanged(GetFocusedView()); 229 OnCaretBoundsChanged(GetFocusedView());
224 } 230 }
225 231
226 } // namespace views 232 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/ime/input_method_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698