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

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

Issue 2339793002: Handle newCursorPosition correctly for Android's commitText() (Closed)
Patch Set: Fix compile error (rebased on r418371) Created 4 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 #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 1395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 const base::string16& text, 1406 const base::string16& text,
1407 const std::vector<blink::WebCompositionUnderline>& underlines, 1407 const std::vector<blink::WebCompositionUnderline>& underlines,
1408 const gfx::Range& replacement_range, 1408 const gfx::Range& replacement_range,
1409 int selection_start, 1409 int selection_start,
1410 int selection_end) { 1410 int selection_end) {
1411 Send(new InputMsg_ImeSetComposition( 1411 Send(new InputMsg_ImeSetComposition(
1412 GetRoutingID(), text, underlines, replacement_range, 1412 GetRoutingID(), text, underlines, replacement_range,
1413 selection_start, selection_end)); 1413 selection_start, selection_end));
1414 } 1414 }
1415 1415
1416 void RenderWidgetHostImpl::ImeConfirmComposition( 1416 void RenderWidgetHostImpl::ImeCommitText(const base::string16& text,
1417 const base::string16& text, 1417 const gfx::Range& replacement_range,
1418 const gfx::Range& replacement_range, 1418 int relative_cursor_pos) {
1419 bool keep_selection) { 1419 Send(new InputMsg_ImeCommitText(GetRoutingID(), text, replacement_range,
1420 Send(new InputMsg_ImeConfirmComposition( 1420 relative_cursor_pos));
1421 GetRoutingID(), text, replacement_range, keep_selection)); 1421 }
1422
1423 void RenderWidgetHostImpl::ImeFinishComposingText(bool keep_selection) {
1424 Send(new InputMsg_ImeFinishComposingText(GetRoutingID(), keep_selection));
1422 } 1425 }
1423 1426
1424 void RenderWidgetHostImpl::ImeCancelComposition() { 1427 void RenderWidgetHostImpl::ImeCancelComposition() {
1425 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(), 1428 Send(new InputMsg_ImeSetComposition(GetRoutingID(), base::string16(),
1426 std::vector<blink::WebCompositionUnderline>(), 1429 std::vector<blink::WebCompositionUnderline>(),
1427 gfx::Range::InvalidRange(), 0, 0)); 1430 gfx::Range::InvalidRange(), 0, 0));
1428 } 1431 }
1429 1432
1430 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() { 1433 void RenderWidgetHostImpl::RejectMouseLockOrUnlockIfNecessary() {
1431 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked()); 1434 DCHECK(!pending_mouse_lock_request_ || !IsMouseLocked());
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; 2206 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL;
2204 } 2207 }
2205 2208
2206 BrowserAccessibilityManager* 2209 BrowserAccessibilityManager*
2207 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { 2210 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() {
2208 return delegate_ ? 2211 return delegate_ ?
2209 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; 2212 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL;
2210 } 2213 }
2211 2214
2212 } // namespace content 2215 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698