From 82ce8c52345cd8ba927e05d370ef328a1112df71 Mon Sep 17 00:00:00 2001 From: shuchen Date: Wed, 22 Oct 2014 18:55:20 -0700 Subject: Exposes the text input flags to ChromeOS IME extensions. BUG=419127 TEST=Verified on linux_chromeos. Review URL: https://codereview.chromium.org/659323003 Cr-Commit-Position: refs/heads/master@{#300820} --- content/browser/browser_plugin/browser_plugin_guest.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'content/browser/browser_plugin/browser_plugin_guest.cc') diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc index 68876ea..ea6a573 100644 --- a/content/browser/browser_plugin/browser_plugin_guest.cc +++ b/content/browser/browser_plugin/browser_plugin_guest.cc @@ -86,6 +86,7 @@ BrowserPluginGuest::BrowserPluginGuest(bool has_render_view, is_in_destruction_(false), last_text_input_type_(ui::TEXT_INPUT_TYPE_NONE), last_input_mode_(ui::TEXT_INPUT_MODE_DEFAULT), + last_input_flags_(0), last_can_compose_inline_(true), guest_proxy_routing_id_(MSG_ROUTING_NONE), delegate_(delegate), @@ -121,7 +122,7 @@ void BrowserPluginGuest::SetFocus(RenderWidgetHost* rwh, bool focused) { rwh->GetView()); if (rwhv) { rwhv->TextInputTypeChanged(last_text_input_type_, last_input_mode_, - last_can_compose_inline_); + last_can_compose_inline_, last_input_flags_); } } @@ -800,15 +801,17 @@ void BrowserPluginGuest::OnTakeFocus(bool reverse) { void BrowserPluginGuest::OnTextInputTypeChanged(ui::TextInputType type, ui::TextInputMode input_mode, - bool can_compose_inline) { + bool can_compose_inline, + int flags) { // Save the state of text input so we can restore it on focus. last_text_input_type_ = type; last_input_mode_ = input_mode; + last_input_flags_ = flags; last_can_compose_inline_ = can_compose_inline; static_cast( web_contents()->GetRenderWidgetHostView())->TextInputTypeChanged( - type, input_mode, can_compose_inline); + type, input_mode, can_compose_inline, flags); } void BrowserPluginGuest::OnImeCancelComposition() { -- cgit v1.1