Chromium Code Reviews| 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 a6ad7f5167f5f59eb050cb48016fbd4fa478818e..11bf3bb1edbf99b5e8fe667308aaf6523b23dbdd 100644 |
| --- a/content/browser/web_contents/web_contents_view_aura.cc |
| +++ b/content/browser/web_contents/web_contents_view_aura.cc |
| @@ -98,8 +98,7 @@ RenderWidgetHostViewAura* ToRenderWidgetHostViewAura( |
| return NULL; // Can't cast to RenderWidgetHostViewAura in unit tests. |
| RenderProcessHostImpl* process = static_cast<RenderProcessHostImpl*>( |
| view->GetRenderWidgetHost()->GetProcess()); |
| - if (process->IsGuest()) |
| - return NULL; |
| + DCHECK(!process->IsGuest()); |
|
jam
2013/11/14 17:42:15
is this dcheck conclusive? i.e. can we still end u
lazyboy
2013/11/14 19:04:50
IsGuest() = true here would mean either a. we inco
lazyboy
2013/11/14 21:34:55
TouchEditable also uses this method, which means t
|
| return static_cast<RenderWidgetHostViewAura*>(view); |
| } |
| @@ -1129,6 +1128,7 @@ gfx::Rect WebContentsViewAura::GetViewBounds() const { |
| return window_->GetBoundsInScreen(); |
| } |
| + |
|
jam
2013/11/14 17:42:15
nit: undo
lazyboy
2013/11/14 19:04:50
Done.
|
| //////////////////////////////////////////////////////////////////////////////// |
| // WebContentsViewAura, WebContentsViewPort implementation: |
| @@ -1162,7 +1162,13 @@ void WebContentsViewAura::CreateView( |
| window_->layer()->SetMasksToBounds(true); |
| window_->SetName("WebContentsViewAura"); |
| - window_observer_.reset(new WindowObserver(this)); |
| + // WindowObserver is not interesting and is problematic for Browser Plugin |
| + // guests. |
| + // 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()) |
| + window_observer_.reset(new WindowObserver(this)); |
| // delegate_->GetDragDestDelegate() creates a new delegate on every call. |
| // Hence, we save a reference to it locally. Similar model is used on other |