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

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

Issue 904013002: Fix OSX IME, Call RVH::SetInputMethodActive() after Attach. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698