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

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: For compile error. 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 text.utf8(), 549 text.utf8(),
550 std_underlines, 550 std_underlines,
551 selectionStart, 551 selectionStart,
552 selectionEnd)); 552 selectionEnd));
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 bool BrowserPlugin::confirmComposition( 557 bool BrowserPlugin::confirmComposition(
558 const blink::WebString& text, 558 const blink::WebString& text,
559 blink::WebWidget::ConfirmCompositionBehavior selectionBehavior) { 559 blink::WebWidget::ConfirmCompositionBehavior selection_behavior,
560 int relative_cursor_pos) {
560 if (!attached()) 561 if (!attached())
561 return false; 562 return false;
562 bool keep_selection = (selectionBehavior == blink::WebWidget::KeepSelection); 563 bool keep_selection = (selection_behavior == blink::WebWidget::KeepSelection);
563 BrowserPluginManager::Get()->Send( 564 BrowserPluginManager::Get()->Send(
564 new BrowserPluginHostMsg_ImeConfirmComposition( 565 new BrowserPluginHostMsg_ImeConfirmComposition(
565 browser_plugin_instance_id_, 566 browser_plugin_instance_id_, text.utf8(), keep_selection,
566 text.utf8(), 567 relative_cursor_pos));
567 keep_selection));
568 // TODO(kochi): This assumes the IPC handling always succeeds. 568 // TODO(kochi): This assumes the IPC handling always succeeds.
569 return true; 569 return true;
570 } 570 }
571 571
572 void BrowserPlugin::extendSelectionAndDelete(int before, int after) { 572 void BrowserPlugin::extendSelectionAndDelete(int before, int after) {
573 if (!attached()) 573 if (!attached())
574 return; 574 return;
575 BrowserPluginManager::Get()->Send( 575 BrowserPluginManager::Get()->Send(
576 new BrowserPluginHostMsg_ExtendSelectionAndDelete( 576 new BrowserPluginHostMsg_ExtendSelectionAndDelete(
577 browser_plugin_instance_id_, 577 browser_plugin_instance_id_,
(...skipping 16 matching lines...) Expand all
594 594
595 bool BrowserPlugin::HandleMouseLockedInputEvent( 595 bool BrowserPlugin::HandleMouseLockedInputEvent(
596 const blink::WebMouseEvent& event) { 596 const blink::WebMouseEvent& event) {
597 BrowserPluginManager::Get()->Send( 597 BrowserPluginManager::Get()->Send(
598 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, 598 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_,
599 &event)); 599 &event));
600 return true; 600 return true;
601 } 601 }
602 602
603 } // namespace content 603 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698