| Index: content/browser/web_contents/web_contents_view_aura.cc
|
| diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
| index f87411e41860532598470427737091c51fdb455b..6937008f183f0ffffb6e18a9fa3c49f81450ec8b 100644
|
| --- a/content/browser/web_contents/web_contents_view_aura.cc
|
| +++ b/content/browser/web_contents/web_contents_view_aura.cc
|
| @@ -102,9 +102,11 @@ RenderWidgetHostViewAura* ToRenderWidgetHostViewAura(
|
| RenderWidgetHostView* view) {
|
| if (!view || RenderViewHostFactory::has_factory())
|
| return NULL; // Can't cast to RenderWidgetHostViewAura in unit tests.
|
| - RenderProcessHostImpl* process = static_cast<RenderProcessHostImpl*>(
|
| - view->GetRenderWidgetHost()->GetProcess());
|
| - if (process->IsGuest())
|
| +
|
| + RenderViewHost* rvh = RenderViewHost::From(view->GetRenderWidgetHost());
|
| + WebContentsImpl* web_contents = static_cast<WebContentsImpl*>(
|
| + rvh ? WebContents::FromRenderViewHost(rvh) : NULL);
|
| + if (web_contents && !!web_contents->GetBrowserPluginGuest())
|
| return NULL;
|
| return static_cast<RenderWidgetHostViewAura*>(view);
|
| }
|
| @@ -1067,7 +1069,7 @@ void WebContentsViewAura::CreateView(
|
| // The use cases for WindowObserver do not apply to Browser Plugins:
|
| // 1) guests do not support NPAPI plugins.
|
| // 2) guests' window bounds are supposed to come from its embedder.
|
| - if (!web_contents_->GetRenderProcessHost()->IsGuest())
|
| + if (!web_contents_->GetBrowserPluginGuest())
|
| window_observer_.reset(new WindowObserver(this));
|
|
|
| // delegate_->GetDragDestDelegate() creates a new delegate on every call.
|
|
|