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

Unified Diff: ui/aura/demo/demo_main.cc

Issue 11421006: Desktop aura: Break aura::Window::SetParent in two. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: I think the content_unittests timeout on linux_aura is flake, but try to fix it anyway. Created 8 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
Index: ui/aura/demo/demo_main.cc
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc
index 91c95d3cf06739fbd1c79c4b3c4b6f235f541cd1..be6342e5d49324d3367e560dcfe7b5c82a015b9e 100644
--- a/ui/aura/demo/demo_main.cc
+++ b/ui/aura/demo/demo_main.cc
@@ -137,7 +137,7 @@ int DemoMain() {
window1.Init(ui::LAYER_TEXTURED);
window1.SetBounds(gfx::Rect(100, 100, 400, 400));
window1.Show();
- window1.SetParent(NULL);
+ window1.SetDefaultParentByTargetRoot(root_window.get(), gfx::Rect());
DemoWindowDelegate window_delegate2(SK_ColorRED);
aura::Window window2(&window_delegate2);
@@ -145,7 +145,7 @@ int DemoMain() {
window2.Init(ui::LAYER_TEXTURED);
window2.SetBounds(gfx::Rect(200, 200, 350, 350));
window2.Show();
- window2.SetParent(NULL);
+ window2.SetDefaultParentByTargetRoot(root_window.get(), gfx::Rect());
DemoWindowDelegate window_delegate3(SK_ColorGREEN);
aura::Window window3(&window_delegate3);
@@ -153,7 +153,7 @@ int DemoMain() {
window3.Init(ui::LAYER_TEXTURED);
window3.SetBounds(gfx::Rect(10, 10, 50, 50));
window3.Show();
- window3.SetParent(&window2);
+ window2.AddChild(&window3);
root_window->ShowRootWindow();
MessageLoopForUI::current()->Run();

Powered by Google App Engine
This is Rietveld 408576698