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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 326403002: Merge ViewHostMsg_TextInputTypeChanged and ViewHostMsg_TextInputStateChanged into one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: 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 f3d3af2512f7e5ebd6ff7061c3ece5aa36ed0f85..dd767f7be1f18795a51c54f4f4c07e2a87bd8d8a 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -463,8 +463,8 @@ bool BrowserPluginGuest::OnMessageReceived(const IPC::Message& message) {
#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_ShowWidget, OnShowWidget)
IPC_MESSAGE_HANDLER(ViewHostMsg_TakeFocus, OnTakeFocus)
- IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputTypeChanged,
- OnTextInputTypeChanged)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged,
+ OnTextInputStateChanged)
IPC_MESSAGE_HANDLER(ViewHostMsg_ImeCancelComposition,
OnImeCancelComposition)
#if defined(OS_MACOSX) || defined(USE_AURA)
@@ -717,8 +717,11 @@ void BrowserPluginGuest::OnSetFocus(int instance_id, bool focused) {
RenderWidgetHostViewBase* rwhv = static_cast<RenderWidgetHostViewBase*>(
web_contents()->GetRenderWidgetHostView());
if (rwhv) {
- rwhv->TextInputTypeChanged(last_text_input_type_, last_input_mode_,
- last_can_compose_inline_);
+ ViewHostMsg_TextInputState_Params params;
+ params.type = last_text_input_type_;
+ params.mode = last_input_mode_;
+ params.can_compose_inline = last_can_compose_inline_;
+ rwhv->TextInputStateChanged(params);
}
}
@@ -869,17 +872,15 @@ void BrowserPluginGuest::OnUpdateRect(
new BrowserPluginMsg_UpdateRect(instance_id(), relay_params));
}
-void BrowserPluginGuest::OnTextInputTypeChanged(ui::TextInputType type,
- ui::TextInputMode input_mode,
- bool can_compose_inline) {
+void BrowserPluginGuest::OnTextInputStateChanged(
+ const ViewHostMsg_TextInputState_Params& params) {
// Save the state of text input so we can restore it on focus.
- last_text_input_type_ = type;
- last_input_mode_ = input_mode;
- last_can_compose_inline_ = can_compose_inline;
+ last_text_input_type_ = params.type;
+ last_input_mode_ = params.mode;
+ last_can_compose_inline_ = params.can_compose_inline;
static_cast<RenderWidgetHostViewBase*>(
- web_contents()->GetRenderWidgetHostView())->TextInputTypeChanged(
- type, input_mode, can_compose_inline);
+ web_contents()->GetRenderWidgetHostView())->TextInputStateChanged(params);
}
void BrowserPluginGuest::OnImeCancelComposition() {

Powered by Google App Engine
This is Rietveld 408576698