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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // The ContextFactory must exist before any Compositors are created. | 123 // The ContextFactory must exist before any Compositors are created. |
124 scoped_ptr<ui::InProcessContextFactory> context_factory( | 124 scoped_ptr<ui::InProcessContextFactory> context_factory( |
125 new ui::InProcessContextFactory()); | 125 new ui::InProcessContextFactory()); |
126 | 126 |
127 // Create the message-loop here before creating the root window. | 127 // Create the message-loop here before creating the root window. |
128 base::MessageLoopForUI message_loop; | 128 base::MessageLoopForUI message_loop; |
129 | 129 |
130 aura::Env::CreateInstance(true); | 130 aura::Env::CreateInstance(true); |
131 aura::Env::GetInstance()->set_context_factory(context_factory.get()); | 131 aura::Env::GetInstance()->set_context_factory(context_factory.get()); |
132 scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create()); | 132 scoped_ptr<aura::TestScreen> test_screen( |
| 133 aura::TestScreen::Create(gfx::Size())); |
133 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); | 134 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); |
134 scoped_ptr<aura::WindowTreeHost> host( | 135 scoped_ptr<aura::WindowTreeHost> host( |
135 test_screen->CreateHostForPrimaryDisplay()); | 136 test_screen->CreateHostForPrimaryDisplay()); |
136 scoped_ptr<DemoWindowTreeClient> window_tree_client( | 137 scoped_ptr<DemoWindowTreeClient> window_tree_client( |
137 new DemoWindowTreeClient(host->window())); | 138 new DemoWindowTreeClient(host->window())); |
138 aura::test::TestFocusClient focus_client; | 139 aura::test::TestFocusClient focus_client; |
139 aura::client::SetFocusClient(host->window(), &focus_client); | 140 aura::client::SetFocusClient(host->window(), &focus_client); |
140 | 141 |
141 // Create a hierarchy of test windows. | 142 // Create a hierarchy of test windows. |
142 DemoWindowDelegate window_delegate1(SK_ColorBLUE); | 143 DemoWindowDelegate window_delegate1(SK_ColorBLUE); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 int main(int argc, char** argv) { | 175 int main(int argc, char** argv) { |
175 CommandLine::Init(argc, argv); | 176 CommandLine::Init(argc, argv); |
176 | 177 |
177 // The exit manager is in charge of calling the dtors of singleton objects. | 178 // The exit manager is in charge of calling the dtors of singleton objects. |
178 base::AtExitManager exit_manager; | 179 base::AtExitManager exit_manager; |
179 | 180 |
180 base::i18n::InitializeICU(); | 181 base::i18n::InitializeICU(); |
181 | 182 |
182 return DemoMain(); | 183 return DemoMain(); |
183 } | 184 } |
OLD | NEW |