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

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

Issue 1999423002: tyrbot test for commitText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SetHasCompositionTextToTrue 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ImeSetComposition( 547 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ImeSetComposition(
548 browser_plugin_instance_id_, 548 browser_plugin_instance_id_,
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::commitText(const blink::WebString& text,
558 const blink::WebString& text, 558 int relative_cursor_pos) {
559 blink::WebWidget::ConfirmCompositionBehavior selectionBehavior) {
560 if (!attached()) 559 if (!attached())
561 return false; 560 return false;
562 bool keep_selection = (selectionBehavior == blink::WebWidget::KeepSelection); 561
563 BrowserPluginManager::Get()->Send( 562 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ImeCommitText(
564 new BrowserPluginHostMsg_ImeConfirmComposition( 563 browser_plugin_instance_id_, text.utf8(), relative_cursor_pos));
565 browser_plugin_instance_id_,
566 text.utf8(),
567 keep_selection));
568 // TODO(kochi): This assumes the IPC handling always succeeds. 564 // TODO(kochi): This assumes the IPC handling always succeeds.
569 return true; 565 return true;
570 } 566 }
567
568 bool BrowserPlugin::finishComposingText(
569 blink::WebWidget::ConfirmCompositionBehavior selection_behavior) {
570 if (!attached())
571 return false;
572 bool keep_selection = (selection_behavior == blink::WebWidget::KeepSelection);
573 BrowserPluginManager::Get()->Send(
574 new BrowserPluginHostMsg_ImeFinishComposingText(keep_selection));
575 // TODO(kochi): This assumes the IPC handling always succeeds.
576 return true;
577 }
571 578
572 void BrowserPlugin::extendSelectionAndDelete(int before, int after) { 579 void BrowserPlugin::extendSelectionAndDelete(int before, int after) {
573 if (!attached()) 580 if (!attached())
574 return; 581 return;
575 BrowserPluginManager::Get()->Send( 582 BrowserPluginManager::Get()->Send(
576 new BrowserPluginHostMsg_ExtendSelectionAndDelete( 583 new BrowserPluginHostMsg_ExtendSelectionAndDelete(
577 browser_plugin_instance_id_, 584 browser_plugin_instance_id_,
578 before, 585 before,
579 after)); 586 after));
580 } 587 }
(...skipping 13 matching lines...) Expand all
594 601
595 bool BrowserPlugin::HandleMouseLockedInputEvent( 602 bool BrowserPlugin::HandleMouseLockedInputEvent(
596 const blink::WebMouseEvent& event) { 603 const blink::WebMouseEvent& event) {
597 BrowserPluginManager::Get()->Send( 604 BrowserPluginManager::Get()->Send(
598 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, 605 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_,
599 &event)); 606 &event));
600 return true; 607 return true;
601 } 608 }
602 609
603 } // namespace content 610 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin.h ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698