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/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/icu_util.h" | 8 #include "base/i18n/icu_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 } // namespace | 289 } // namespace |
290 | 290 |
291 int main(int argc, char** argv) { | 291 int main(int argc, char** argv) { |
292 CommandLine::Init(argc, argv); | 292 CommandLine::Init(argc, argv); |
293 | 293 |
294 base::AtExitManager exit_manager; | 294 base::AtExitManager exit_manager; |
295 | 295 |
296 gfx::GLSurface::InitializeOneOff(); | 296 gfx::GLSurface::InitializeOneOff(); |
297 | 297 |
298 // The ContextFactory must exist before any Compositors are created. | 298 // The ContextFactory must exist before any Compositors are created. |
299 bool allow_test_contexts = false; | 299 bool enable_pixel_output = true; |
300 ui::InitializeContextFactoryForTests(allow_test_contexts); | 300 ui::InitializeContextFactoryForTests(enable_pixel_output); |
301 | 301 |
302 base::i18n::InitializeICU(); | 302 base::i18n::InitializeICU(); |
303 | 303 |
304 base::MessageLoopForUI message_loop; | 304 base::MessageLoopForUI message_loop; |
305 aura::Env::CreateInstance(); | 305 aura::Env::CreateInstance(); |
306 scoped_ptr<aura::TestScreen> test_screen( | 306 scoped_ptr<aura::TestScreen> test_screen( |
307 aura::TestScreen::CreateFullscreen()); | 307 aura::TestScreen::CreateFullscreen()); |
308 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); | 308 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); |
309 scoped_ptr<aura::RootWindow> root_window( | 309 scoped_ptr<aura::RootWindow> root_window( |
310 test_screen->CreateRootWindowForPrimaryDisplay()); | 310 test_screen->CreateRootWindowForPrimaryDisplay()); |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 ui::PrintLayerHierarchy(root_window->window()->layer(), gfx::Point(100, 100)); | 356 ui::PrintLayerHierarchy(root_window->window()->layer(), gfx::Point(100, 100)); |
357 #endif | 357 #endif |
358 | 358 |
359 root_window->host()->Show(); | 359 root_window->host()->Show(); |
360 base::MessageLoopForUI::current()->Run(); | 360 base::MessageLoopForUI::current()->Run(); |
361 focus_client.reset(); | 361 focus_client.reset(); |
362 root_window.reset(); | 362 root_window.reset(); |
363 | 363 |
364 return 0; | 364 return 0; |
365 } | 365 } |
OLD | NEW |