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

Unified Diff: ui/views/widget/native_widget_aura.cc

Issue 11962021: Revert 177182 - ViewTest.ChangeNativeViewHierarchyFindRoots failure (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_stacking_client.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
===================================================================
--- ui/views/widget/native_widget_aura.cc (revision 177189)
+++ ui/views/widget/native_widget_aura.cc (working copy)
@@ -136,8 +136,15 @@
if (parent) {
parent->AddChild(window_);
} else {
- window_->SetDefaultParentByRootWindow(context->GetRootWindow(),
- window_bounds);
+ // TODO(erg): Once I've threaded context through chrome, uncomment this
+ // check, which currently fails on the NULL == NULL case.
+ //
+ // DCHECK_NE(params.GetParent(), params.context);
+
+ // TODO(erg): Remove this NULL check once we've made everything in views
+ // actually pass us a context.
+ aura::RootWindow* root_window = context ? context->GetRootWindow() : NULL;
+ window_->SetDefaultParentByRootWindow(root_window, window_bounds);
}
// Wait to set the bounds until we have a parent. That way we can know our
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_stacking_client.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698