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

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

Issue 2333813002: Introduce WebInputMethodController to blink (Closed)
Patch Set: Explicitly asking for TextInputState updates Created 4 years, 1 month 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 if (!attached()) 564 if (!attached())
565 return false; 565 return false;
566 566
567 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ImeCommitText( 567 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ImeCommitText(
568 browser_plugin_instance_id_, text.utf8(), relative_cursor_pos)); 568 browser_plugin_instance_id_, text.utf8(), relative_cursor_pos));
569 // TODO(kochi): This assumes the IPC handling always succeeds. 569 // TODO(kochi): This assumes the IPC handling always succeeds.
570 return true; 570 return true;
571 } 571 }
572 572
573 bool BrowserPlugin::finishComposingText( 573 bool BrowserPlugin::finishComposingText(
574 blink::WebWidget::ConfirmCompositionBehavior selection_behavior) { 574 blink::WebInputMethodController::ConfirmCompositionBehavior
575 selection_behavior) {
575 if (!attached()) 576 if (!attached())
576 return false; 577 return false;
577 bool keep_selection = (selection_behavior == blink::WebWidget::KeepSelection); 578 bool keep_selection =
579 (selection_behavior == blink::WebInputMethodController::KeepSelection);
578 BrowserPluginManager::Get()->Send( 580 BrowserPluginManager::Get()->Send(
579 new BrowserPluginHostMsg_ImeFinishComposingText(keep_selection)); 581 new BrowserPluginHostMsg_ImeFinishComposingText(keep_selection));
580 // TODO(kochi): This assumes the IPC handling always succeeds. 582 // TODO(kochi): This assumes the IPC handling always succeeds.
581 return true; 583 return true;
582 } 584 }
583 585
584 void BrowserPlugin::extendSelectionAndDelete(int before, int after) { 586 void BrowserPlugin::extendSelectionAndDelete(int before, int after) {
585 if (!attached()) 587 if (!attached())
586 return; 588 return;
587 BrowserPluginManager::Get()->Send( 589 BrowserPluginManager::Get()->Send(
(...skipping 18 matching lines...) Expand all
606 608
607 bool BrowserPlugin::HandleMouseLockedInputEvent( 609 bool BrowserPlugin::HandleMouseLockedInputEvent(
608 const blink::WebMouseEvent& event) { 610 const blink::WebMouseEvent& event) {
609 BrowserPluginManager::Get()->Send( 611 BrowserPluginManager::Get()->Send(
610 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_, 612 new BrowserPluginHostMsg_HandleInputEvent(browser_plugin_instance_id_,
611 &event)); 613 &event));
612 return true; 614 return true;
613 } 615 }
614 616
615 } // namespace content 617 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698