OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/i18n/icu_util.h" | 7 #include "base/i18n/icu_util.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "third_party/skia/include/core/SkXfermode.h" | 10 #include "third_party/skia/include/core/SkXfermode.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // Create the message-loop here before creating the root window. | 87 // Create the message-loop here before creating the root window. |
88 MessageLoop message_loop(MessageLoop::TYPE_UI); | 88 MessageLoop message_loop(MessageLoop::TYPE_UI); |
89 ui::CompositorTestSupport::Initialize(); | 89 ui::CompositorTestSupport::Initialize(); |
90 | 90 |
91 aura::RootWindow::GetInstance(); | 91 aura::RootWindow::GetInstance(); |
92 | 92 |
93 // Create a hierarchy of test windows. | 93 // Create a hierarchy of test windows. |
94 DemoWindowDelegate window_delegate1(SK_ColorBLUE); | 94 DemoWindowDelegate window_delegate1(SK_ColorBLUE); |
95 aura::Window window1(&window_delegate1); | 95 aura::Window window1(&window_delegate1); |
96 window1.set_id(1); | 96 window1.set_id(1); |
97 window1.Init(ui::Layer::LAYER_HAS_TEXTURE); | 97 window1.Init(ui::Layer::LAYER_TEXTURED); |
98 window1.SetBounds(gfx::Rect(100, 100, 400, 400)); | 98 window1.SetBounds(gfx::Rect(100, 100, 400, 400)); |
99 window1.Show(); | 99 window1.Show(); |
100 window1.SetParent(NULL); | 100 window1.SetParent(NULL); |
101 | 101 |
102 DemoWindowDelegate window_delegate2(SK_ColorRED); | 102 DemoWindowDelegate window_delegate2(SK_ColorRED); |
103 aura::Window window2(&window_delegate2); | 103 aura::Window window2(&window_delegate2); |
104 window2.set_id(2); | 104 window2.set_id(2); |
105 window2.Init(ui::Layer::LAYER_HAS_TEXTURE); | 105 window2.Init(ui::Layer::LAYER_TEXTURED); |
106 window2.SetBounds(gfx::Rect(200, 200, 350, 350)); | 106 window2.SetBounds(gfx::Rect(200, 200, 350, 350)); |
107 window2.Show(); | 107 window2.Show(); |
108 window2.SetParent(NULL); | 108 window2.SetParent(NULL); |
109 | 109 |
110 DemoWindowDelegate window_delegate3(SK_ColorGREEN); | 110 DemoWindowDelegate window_delegate3(SK_ColorGREEN); |
111 aura::Window window3(&window_delegate3); | 111 aura::Window window3(&window_delegate3); |
112 window3.set_id(3); | 112 window3.set_id(3); |
113 window3.Init(ui::Layer::LAYER_HAS_TEXTURE); | 113 window3.Init(ui::Layer::LAYER_TEXTURED); |
114 window3.SetBounds(gfx::Rect(10, 10, 50, 50)); | 114 window3.SetBounds(gfx::Rect(10, 10, 50, 50)); |
115 window3.Show(); | 115 window3.Show(); |
116 window3.SetParent(&window2); | 116 window3.SetParent(&window2); |
117 | 117 |
118 aura::RootWindow::GetInstance()->Run(); | 118 aura::RootWindow::GetInstance()->Run(); |
119 | 119 |
120 ui::CompositorTestSupport::Terminate(); | 120 ui::CompositorTestSupport::Terminate(); |
121 | 121 |
122 return 0; | 122 return 0; |
123 } | 123 } |
OLD | NEW |