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

Unified Diff: components/plugins/renderer/webview_plugin.cc

Issue 144803003: Fix issue that IME can't be enabled when set Plugin mode to "Click to play". (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updating the fixing with merging into ReplayReceivedData. Created 6 years, 11 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 | « components/plugins/renderer/webview_plugin.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/plugins/renderer/webview_plugin.cc
diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
index faf56e29ce43ac0fb0e58fb873780afd1f403d9e..e0d8e3588dcb44f3c639686b67a710c87c6dd44b 100644
--- a/components/plugins/renderer/webview_plugin.cc
+++ b/components/plugins/renderer/webview_plugin.cc
@@ -46,7 +46,8 @@ WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate)
container_(NULL),
web_view_(WebView::create(this)),
web_frame_(WebFrame::create(this)),
- finished_loading_(false) {
+ finished_loading_(false),
+ focused_(false) {
web_view_->setMainFrame(web_frame_);
}
@@ -84,6 +85,10 @@ void WebViewPlugin::ReplayReceivedData(WebPlugin* plugin) {
"PluginDocument.NumChunks",
(base::checked_numeric_cast<int, size_t>(data_.size())));
}
+ // We need to transfer the |focused_| to new plugin after it loaded.
+ if (focused_) {
+ plugin->updateFocus(true);
+ }
if (finished_loading_) {
plugin->didFinishLoading();
}
@@ -150,6 +155,10 @@ void WebViewPlugin::updateGeometry(const WebRect& frame_rect,
}
}
+void WebViewPlugin::updateFocus(bool focused) {
+ focused_ = focused;
+}
+
bool WebViewPlugin::acceptsInputEvents() { return true; }
bool WebViewPlugin::handleInputEvent(const WebInputEvent& event,
« no previous file with comments | « components/plugins/renderer/webview_plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698