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

Side by Side Diff: ui/aura/demo/demo_main.cc

Issue 1050713002: aura: Remove layerless windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: layerless: rebase Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/test/aura_test_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/power_monitor/power_monitor.h" 10 #include "base/power_monitor/power_monitor.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 test_screen->CreateHostForPrimaryDisplay()); 149 test_screen->CreateHostForPrimaryDisplay());
150 scoped_ptr<DemoWindowTreeClient> window_tree_client( 150 scoped_ptr<DemoWindowTreeClient> window_tree_client(
151 new DemoWindowTreeClient(host->window())); 151 new DemoWindowTreeClient(host->window()));
152 aura::test::TestFocusClient focus_client; 152 aura::test::TestFocusClient focus_client;
153 aura::client::SetFocusClient(host->window(), &focus_client); 153 aura::client::SetFocusClient(host->window(), &focus_client);
154 154
155 // Create a hierarchy of test windows. 155 // Create a hierarchy of test windows.
156 DemoWindowDelegate window_delegate1(SK_ColorBLUE); 156 DemoWindowDelegate window_delegate1(SK_ColorBLUE);
157 aura::Window window1(&window_delegate1); 157 aura::Window window1(&window_delegate1);
158 window1.set_id(1); 158 window1.set_id(1);
159 window1.Init(aura::WINDOW_LAYER_TEXTURED); 159 window1.Init(ui::LAYER_TEXTURED);
160 window1.SetBounds(gfx::Rect(100, 100, 400, 400)); 160 window1.SetBounds(gfx::Rect(100, 100, 400, 400));
161 window1.Show(); 161 window1.Show();
162 aura::client::ParentWindowWithContext(&window1, host->window(), gfx::Rect()); 162 aura::client::ParentWindowWithContext(&window1, host->window(), gfx::Rect());
163 163
164 DemoWindowDelegate window_delegate2(SK_ColorRED); 164 DemoWindowDelegate window_delegate2(SK_ColorRED);
165 aura::Window window2(&window_delegate2); 165 aura::Window window2(&window_delegate2);
166 window2.set_id(2); 166 window2.set_id(2);
167 window2.Init(aura::WINDOW_LAYER_TEXTURED); 167 window2.Init(ui::LAYER_TEXTURED);
168 window2.SetBounds(gfx::Rect(200, 200, 350, 350)); 168 window2.SetBounds(gfx::Rect(200, 200, 350, 350));
169 window2.Show(); 169 window2.Show();
170 aura::client::ParentWindowWithContext(&window2, host->window(), gfx::Rect()); 170 aura::client::ParentWindowWithContext(&window2, host->window(), gfx::Rect());
171 171
172 DemoWindowDelegate window_delegate3(SK_ColorGREEN); 172 DemoWindowDelegate window_delegate3(SK_ColorGREEN);
173 aura::Window window3(&window_delegate3); 173 aura::Window window3(&window_delegate3);
174 window3.set_id(3); 174 window3.set_id(3);
175 window3.Init(aura::WINDOW_LAYER_TEXTURED); 175 window3.Init(ui::LAYER_TEXTURED);
176 window3.SetBounds(gfx::Rect(10, 10, 50, 50)); 176 window3.SetBounds(gfx::Rect(10, 10, 50, 50));
177 window3.Show(); 177 window3.Show();
178 window2.AddChild(&window3); 178 window2.AddChild(&window3);
179 179
180 host->Show(); 180 host->Show();
181 base::MessageLoopForUI::current()->Run(); 181 base::MessageLoopForUI::current()->Run();
182 182
183 return 0; 183 return 0;
184 } 184 }
185 185
186 } // namespace 186 } // namespace
187 187
188 int main(int argc, char** argv) { 188 int main(int argc, char** argv) {
189 base::CommandLine::Init(argc, argv); 189 base::CommandLine::Init(argc, argv);
190 190
191 // The exit manager is in charge of calling the dtors of singleton objects. 191 // The exit manager is in charge of calling the dtors of singleton objects.
192 base::AtExitManager exit_manager; 192 base::AtExitManager exit_manager;
193 193
194 base::i18n::InitializeICU(); 194 base::i18n::InitializeICU();
195 195
196 return DemoMain(); 196 return DemoMain();
197 } 197 }
OLDNEW
« no previous file with comments | « ui/aura/aura.gyp ('k') | ui/aura/test/aura_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698