Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 72283002: winaura: Do not create WindowObservers for BrowserPlugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/apps/web_view_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/apps/web_view_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698