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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 1995333002: Handle newCursorPosition correctly for Android's commitText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add 3 tests Created 4 years, 4 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 "content/browser/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <set> 9 #include <set>
10 #include <tuple> 10 #include <tuple>
(...skipping 1403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 int selection_start, 1414 int selection_start,
1415 int selection_end) { 1415 int selection_end) {
1416 Send(new InputMsg_ImeSetComposition( 1416 Send(new InputMsg_ImeSetComposition(
1417 GetRoutingID(), text, underlines, replacement_range, 1417 GetRoutingID(), text, underlines, replacement_range,
1418 selection_start, selection_end)); 1418 selection_start, selection_end));
1419 } 1419 }
1420 1420
1421 void RenderWidgetHostImpl::ImeConfirmComposition( 1421 void RenderWidgetHostImpl::ImeConfirmComposition(
1422 const base::string16& text, 1422 const base::string16& text,
1423 const gfx::Range& replacement_range, 1423 const gfx::Range& replacement_range,
1424 bool keep_selection) { 1424 bool keep_selection,
1425 int new_cursor_pos) {
1425 Send(new InputMsg_ImeConfirmComposition( 1426 Send(new InputMsg_ImeConfirmComposition(
1426 GetRoutingID(), text, replacement_range, keep_selection)); 1427 GetRoutingID(), text, replacement_range, keep_selection, new_cursor_pos));
1427 } 1428 }
1428 1429
1429 void RenderWidgetHostImpl::ImeCancelComposition() { 1430 void RenderWidgetHostImpl::ImeCancelComposition() {
1430 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(), 1431 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(),
1431 std::vector<blink::WebCompositionUnderline>(), 1432 std::vector<blink::WebCompositionUnderline>(),
1432 gfx::Range::InvalidRange(), 0, 0)); 1433 gfx::Range::InvalidRange(), 0, 0));
1433 } 1434 }
1434 1435
1435 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() { 1436 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() {
1436 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked()); 1437 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked());
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2209 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2209 } 2210 }
2210 2211
2211 BrowserAccessibilityManager* 2212 BrowserAccessibilityManager*
2212 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2213 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2213 return delegate_ ? 2214 return delegate_ ?
2214 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2215 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2215 } 2216 }
2216 2217
2217 } // namespace content 2218 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698