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

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: Update the fixing with a focused_ flag in WebViewPlugin 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
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..5593dcc82385dcc31ae9f70fc75f3dcfc9e7a571 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_);
}
@@ -150,6 +151,14 @@ void WebViewPlugin::updateGeometry(const WebRect& frame_rect,
}
}
+void WebViewPlugin::updateFocus(bool focused){
Bernhard Bauer 2014/01/25 14:36:37 Nit: space before {
Ruiyi Luo 2014/01/26 09:40:28 Done.
+ focused_ = focused;
+}
+
+bool WebViewPlugin::hasFocus(){
Bernhard Bauer 2014/01/25 14:36:37 Here too.
+ return focused_;
+}
+
bool WebViewPlugin::acceptsInputEvents() { return true; }
bool WebViewPlugin::handleInputEvent(const WebInputEvent& event,
« components/plugins/renderer/webview_plugin.h ('K') | « components/plugins/renderer/webview_plugin.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698