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

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: adjust selection in confirmCompositionOrInsertText() 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 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 int selection_start, 1378 int selection_start,
1379 int selection_end) { 1379 int selection_end) {
1380 Send(new InputMsg_ImeSetComposition( 1380 Send(new InputMsg_ImeSetComposition(
1381 GetRoutingID(), text, underlines, replacement_range, 1381 GetRoutingID(), text, underlines, replacement_range,
1382 selection_start, selection_end)); 1382 selection_start, selection_end));
1383 } 1383 }
1384 1384
1385 void RenderWidgetHostImpl::ImeConfirmComposition( 1385 void RenderWidgetHostImpl::ImeConfirmComposition(
1386 const base::string16& text, 1386 const base::string16& text,
1387 const gfx::Range& replacement_range, 1387 const gfx::Range& replacement_range,
1388 bool keep_selection) { 1388 bool keep_selection,
1389 int new_cursor_pos) {
1389 Send(new InputMsg_ImeConfirmComposition( 1390 Send(new InputMsg_ImeConfirmComposition(
1390 GetRoutingID(), text, replacement_range, keep_selection)); 1391 GetRoutingID(), text, replacement_range, keep_selection, new_cursor_pos));
1391 } 1392 }
1392 1393
1393 void RenderWidgetHostImpl::ImeCancelComposition() { 1394 void RenderWidgetHostImpl::ImeCancelComposition() {
1394 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(), 1395 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(),
1395 std::vector<blink::WebCompositionUnderline>(), 1396 std::vector<blink::WebCompositionUnderline>(),
1396 gfx::Range::InvalidRange(), 0, 0)); 1397 gfx::Range::InvalidRange(), 0, 0));
1397 } 1398 }
1398 1399
1399 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() { 1400 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() {
1400 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked()); 1401 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked());
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
2166 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2167 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2167 } 2168 }
2168 2169
2169 BrowserAccessibilityManager* 2170 BrowserAccessibilityManager*
2170 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2171 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2171 return delegate_ ? 2172 return delegate_ ?
2172 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2173 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2173 } 2174 }
2174 2175
2175 } // namespace content 2176 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698