| Index: content/renderer/browser_plugin/browser_plugin.cc
|
| diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
|
| index 6139b839c0b5fb59bee0e1fcb2196686c49dbba4..d74cab257971e1b62ac179fef9e0ecb65efbfebc 100644
|
| --- a/content/renderer/browser_plugin/browser_plugin.cc
|
| +++ b/content/renderer/browser_plugin/browser_plugin.cc
|
| @@ -72,6 +72,7 @@ BrowserPlugin::BrowserPlugin(
|
| navigate_src_sent_(false),
|
| process_id_(-1),
|
| persist_storage_(false),
|
| + content_window_routing_id_(MSG_ROUTING_NONE),
|
| visible_(true),
|
| current_nav_entry_index_(0),
|
| nav_entry_count_(0) {
|
| @@ -134,6 +135,17 @@ void BrowserPlugin::SetSrcAttribute(const std::string& src) {
|
| src_ = src;
|
| }
|
|
|
| +NPObject* BrowserPlugin::GetContentWindow() const {
|
| + if (content_window_routing_id_ == MSG_ROUTING_NONE)
|
| + return NULL;
|
| + RenderViewImpl* guest_render_view = static_cast<RenderViewImpl*>(
|
| + ChildThread::current()->ResolveRoute(content_window_routing_id_));
|
| + if (!guest_render_view)
|
| + return NULL;
|
| + WebKit::WebFrame* guest_frame = guest_render_view->GetWebView()->mainFrame();
|
| + return guest_frame->windowObject();
|
| +}
|
| +
|
| std::string BrowserPlugin::GetPartitionAttribute() const {
|
| std::string value;
|
| if (persist_storage_)
|
| @@ -486,6 +498,11 @@ void BrowserPlugin::AdvanceFocus(bool reverse) {
|
| render_view_->GetWebView()->advanceFocus(reverse);
|
| }
|
|
|
| +void BrowserPlugin::GuestContentWindowReady(int content_window_routing_id) {
|
| + DCHECK(content_window_routing_id != MSG_ROUTING_NONE);
|
| + content_window_routing_id_ = content_window_routing_id;
|
| +}
|
| +
|
| void BrowserPlugin::SetAcceptTouchEvents(bool accept) {
|
| if (container())
|
| container()->setIsAcceptingTouchEvents(accept);
|
|
|