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

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: Created 4 years, 7 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 <utility> 10 #include <utility>
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
1372 int selection_start, 1372 int selection_start,
1373 int selection_end) { 1373 int selection_end) {
1374 Send(new InputMsg_ImeSetComposition( 1374 Send(new InputMsg_ImeSetComposition(
1375 GetRoutingID(), text, underlines, replacement_range, 1375 GetRoutingID(), text, underlines, replacement_range,
1376 selection_start, selection_end)); 1376 selection_start, selection_end));
1377 } 1377 }
1378 1378
1379 void RenderWidgetHostImpl::ImeConfirmComposition( 1379 void RenderWidgetHostImpl::ImeConfirmComposition(
1380 const base::string16& text, 1380 const base::string16& text,
1381 const gfx::Range& replacement_range, 1381 const gfx::Range& replacement_range,
1382 bool keep_selection) { 1382 bool keep_selection,
1383 int new_cursor_pos) {
1383 Send(new InputMsg_ImeConfirmComposition( 1384 Send(new InputMsg_ImeConfirmComposition(
1384 GetRoutingID(), text, replacement_range, keep_selection)); 1385 GetRoutingID(), text, replacement_range, keep_selection, new_cursor_pos));
1385 } 1386 }
1386 1387
1387 void RenderWidgetHostImpl::ImeCancelComposition() { 1388 void RenderWidgetHostImpl::ImeCancelComposition() {
1388 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(), 1389 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(),
1389 std::vector<blink::WebCompositionUnderline>(), 1390 std::vector<blink::WebCompositionUnderline>(),
1390 gfx::Range::InvalidRange(), 0, 0)); 1391 gfx::Range::InvalidRange(), 0, 0));
1391 } 1392 }
1392 1393
1393 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() { 1394 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() {
1394 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked()); 1395 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked());
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
2151 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2152 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2152 } 2153 }
2153 2154
2154 BrowserAccessibilityManager* 2155 BrowserAccessibilityManager*
2155 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2156 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2156 return delegate_ ? 2157 return delegate_ ?
2157 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2158 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2158 } 2159 }
2159 2160
2160 } // namespace content 2161 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698