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_);
}
"PluginDocument.NumChunks",
(base::checked_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();
}
}
}
+void WebViewPlugin::updateFocus(bool focused) {
+ focused_ = focused;
+}
+
bool WebViewPlugin::acceptsInputEvents() { return true; }
bool WebViewPlugin::handleInputEvent(const WebInputEvent& event,