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

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: Fix test name. 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 782d57e86482dd8835aafd9d8a88931b427dcc47..477bc472235de4dbcaf8d322bdf0ece152162cdd 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -1219,7 +1219,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