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 |