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

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

Issue 317823002: Implement NativeViewHostAura::InstallClip. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add more tests Created 6 years, 6 months 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
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 772d2afea3cf78f5ac661eedfca3c43a4cc0bddb..3267145cdfa38b5eb927234f57a320de82f8ea8f 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -558,6 +558,12 @@ class WebContentsViewAura::WindowObserver
aura::Window* parent) OVERRIDE {
if (window != view_->window_)
return;
+
+ // Since all native views are hosted inside a clipping window, the actual
+ // parent that we care about is the clipping window's parent.
+ if (parent)
sky 2014/06/16 17:11:03 That a different parent exists is an implementatio
calamity 2014/06/17 05:01:12 Since this operates at the window level, I don't t
sky 2014/06/17 16:25:25 Neither of these options work since this code shou
+ parent = parent->parent();
+
if (parent_)
parent_->RemoveObserver(this);
@@ -673,7 +679,7 @@ class WebContentsViewAura::WindowObserver
if (parent_) {
const aura::Window::Windows& children = parent_->children();
for (size_t i = 0; i < children.size(); ++i) {
- if (children[i] != view_->window_ &&
+ if (children[i] != view_->window_->parent() &&
children[i] != exclude &&
children[i]->IsVisible()) {
constrained_windows.push_back(children[i]->GetBoundsInRootWindow());
« no previous file with comments | « no previous file | ui/views/controls/native/native_view_host.cc » ('j') | ui/views/controls/native/native_view_host_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698