| 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,
|
|
|