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/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "third_party/skia/include/core/SkXfermode.h" | 10 #include "third_party/skia/include/core/SkXfermode.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 new ui::InProcessContextFactory()); | 125 new ui::InProcessContextFactory()); |
126 ui::ContextFactory::SetInstance(context_factory.get()); | 126 ui::ContextFactory::SetInstance(context_factory.get()); |
127 | 127 |
128 // Create the message-loop here before creating the root window. | 128 // Create the message-loop here before creating the root window. |
129 base::MessageLoopForUI message_loop; | 129 base::MessageLoopForUI message_loop; |
130 | 130 |
131 aura::Env::CreateInstance(true); | 131 aura::Env::CreateInstance(true); |
132 scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create()); | 132 scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create()); |
133 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); | 133 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); |
134 scoped_ptr<aura::WindowTreeHost> host( | 134 scoped_ptr<aura::WindowTreeHost> host( |
135 test_screen->CreateHostForPrimaryDisplay()); | 135 test_screen->CreateHostForPrimaryDisplay(context_factory.get())); |
136 scoped_ptr<DemoWindowTreeClient> window_tree_client( | 136 scoped_ptr<DemoWindowTreeClient> window_tree_client( |
137 new DemoWindowTreeClient(host->window())); | 137 new DemoWindowTreeClient(host->window())); |
138 aura::test::TestFocusClient focus_client; | 138 aura::test::TestFocusClient focus_client; |
139 aura::client::SetFocusClient(host->window(), &focus_client); | 139 aura::client::SetFocusClient(host->window(), &focus_client); |
140 | 140 |
141 // Create a hierarchy of test windows. | 141 // Create a hierarchy of test windows. |
142 DemoWindowDelegate window_delegate1(SK_ColorBLUE); | 142 DemoWindowDelegate window_delegate1(SK_ColorBLUE); |
143 aura::Window window1(&window_delegate1); | 143 aura::Window window1(&window_delegate1); |
144 window1.set_id(1); | 144 window1.set_id(1); |
145 window1.Init(aura::WINDOW_LAYER_TEXTURED); | 145 window1.Init(aura::WINDOW_LAYER_TEXTURED); |
(...skipping 28 matching lines...) Expand all Loading... |
174 int main(int argc, char** argv) { | 174 int main(int argc, char** argv) { |
175 CommandLine::Init(argc, argv); | 175 CommandLine::Init(argc, argv); |
176 | 176 |
177 // The exit manager is in charge of calling the dtors of singleton objects. | 177 // The exit manager is in charge of calling the dtors of singleton objects. |
178 base::AtExitManager exit_manager; | 178 base::AtExitManager exit_manager; |
179 | 179 |
180 base::i18n::InitializeICU(); | 180 base::i18n::InitializeICU(); |
181 | 181 |
182 return DemoMain(); | 182 return DemoMain(); |
183 } | 183 } |
OLD | NEW |