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 3c412a0a9892c77c1f7ed302d86818ba6c7e1246..21530e09ba11077f0c4af67670f70e4fa98cc7d4 100644 |
--- a/content/browser/browser_plugin/browser_plugin_guest.cc |
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc |
@@ -287,14 +287,6 @@ void BrowserPluginGuest::InitInternal( |
GetWebContents()->GetRenderViewHost()->GetWebkitPreferences(); |
prefs.navigate_on_drag_drop = false; |
GetWebContents()->GetRenderViewHost()->UpdateWebkitPreferences(prefs); |
- |
- // Enable input method for guest if it's enabled for the embedder. |
- if (static_cast<RenderViewHostImpl*>( |
- owner_web_contents_->GetRenderViewHost())->input_method_active()) { |
- RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( |
- GetWebContents()->GetRenderViewHost()); |
- guest_rvh->SetInputMethodActive(true); |
- } |
} |
BrowserPluginGuest::~BrowserPluginGuest() { |
@@ -640,6 +632,14 @@ void BrowserPluginGuest::Attach( |
has_render_view_ = true; |
+ // Enable input method for guest if it's enabled for the embedder. |
+ if (static_cast<RenderViewHostImpl*>( |
+ owner_web_contents_->GetRenderViewHost())->input_method_active()) { |
+ RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>( |
+ GetWebContents()->GetRenderViewHost()); |
+ guest_rvh->SetInputMethodActive(true); |
+ } |
+ |
RecordAction(base::UserMetricsAction("BrowserPlugin.Guest.Attached")); |
} |