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

Side by Side Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 1995333002: Handle newCursorPosition correctly for Android's commitText() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync. Almost the same to the previous patch. 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/renderer/browser_plugin/browser_plugin.h" 5 #include "content/renderer/browser_plugin/browser_plugin.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 text.utf8(), 534 text.utf8(),
535 std_underlines, 535 std_underlines,
536 selectionStart, 536 selectionStart,
537 selectionEnd)); 537 selectionEnd));
538 // TODO(kochi): This assumes the IPC handling always succeeds. 538 // TODO(kochi): This assumes the IPC handling always succeeds.
539 return true; 539 return true;
540 } 540 }
541 541
542 bool BrowserPlugin::confirmComposition( 542 bool BrowserPlugin::confirmComposition(
543 const blink::WebString& text, 543 const blink::WebString& text,
544 blink::WebWidget::ConfirmCompositionBehavior selectionBehavior) { 544 blink::WebWidget::ConfirmCompositionBehavior selection_behavior,
545 int new_cursor_pos) {
545 if (!attached()) 546 if (!attached())
546 return false; 547 return false;
547 bool keep_selection = (selectionBehavior == blink::WebWidget::KeepSelection); 548 bool keep_selection = (selection_behavior == blink::WebWidget::KeepSelection);
548 BrowserPluginManager::Get()->Send( 549 BrowserPluginManager::Get()->Send(
549 new BrowserPluginHostMsg_ImeConfirmComposition( 550 new BrowserPluginHostMsg_ImeConfirmComposition(
550 browser_plugin_instance_id_, 551 browser_plugin_instance_id_, text.utf8(), keep_selection,
551 text.utf8(), 552 new_cursor_pos));
552 keep_selection));
553 // TODO(kochi): This assumes the IPC handling always succeeds. 553 // TODO(kochi): This assumes the IPC handling always succeeds.
554 return true; 554 return true;
555 } 555 }
556 556
557 void BrowserPlugin::extendSelectionAndDelete(int before, int after) { 557 void BrowserPlugin::extendSelectionAndDelete(int before, int after) {
558 if (!attached()) 558 if (!attached())
559 return; 559 return;
560 BrowserPluginManager::Get()->Send( 560 BrowserPluginManager::Get()->Send(
561 new BrowserPluginHostMsg_ExtendSelectionAndDelete( 561 new BrowserPluginHostMsg_ExtendSelectionAndDelete(
562 browser_plugin_instance_id_, 562 browser_plugin_instance_id_,
(...skipping 16 matching lines...) Expand all
579 579
580 bool BrowserPlugin::HandleMouseLockedInputEvent( 580 bool BrowserPlugin::HandleMouseLockedInputEvent(
581 const blink::WebMouseEvent& event) { 581 const blink::WebMouseEvent& event) {
582 BrowserPluginManager::Get()->Send( 582 BrowserPluginManager::Get()->Send(
583 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, 583 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_,
584 &event)); 584 &event));
585 return true; 585 return true;
586 } 586 }
587 587
588 } // namespace content 588 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698