| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 302 |
| 303 // The ContextFactory must exist before any Compositors are created. | 303 // The ContextFactory must exist before any Compositors are created. |
| 304 bool allow_test_contexts = false; | 304 bool allow_test_contexts = false; |
| 305 ui::Compositor::InitializeContextFactoryForTests(allow_test_contexts); | 305 ui::Compositor::InitializeContextFactoryForTests(allow_test_contexts); |
| 306 | 306 |
| 307 ui::RegisterPathProvider(); | 307 ui::RegisterPathProvider(); |
| 308 base::i18n::InitializeICU(); | 308 base::i18n::InitializeICU(); |
| 309 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | 309 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); |
| 310 | 310 |
| 311 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); | 311 base::MessageLoop message_loop(base::MessageLoop::TYPE_UI); |
| 312 aura::Env::GetInstance(); | 312 aura::Env::CreateInstance(); |
| 313 scoped_ptr<aura::TestScreen> test_screen( | 313 scoped_ptr<aura::TestScreen> test_screen( |
| 314 aura::TestScreen::CreateFullscreen()); | 314 aura::TestScreen::CreateFullscreen()); |
| 315 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); | 315 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); |
| 316 scoped_ptr<aura::RootWindow> root_window( | 316 scoped_ptr<aura::RootWindow> root_window( |
| 317 test_screen->CreateRootWindowForPrimaryDisplay()); | 317 test_screen->CreateRootWindowForPrimaryDisplay()); |
| 318 aura::client::SetCaptureClient( | 318 aura::client::SetCaptureClient( |
| 319 root_window.get(), | 319 root_window.get(), |
| 320 new aura::client::DefaultCaptureClient(root_window.get())); | 320 new aura::client::DefaultCaptureClient(root_window.get())); |
| 321 | 321 |
| 322 scoped_ptr<aura::client::FocusClient> focus_client(new aura::FocusManager); | 322 scoped_ptr<aura::client::FocusClient> focus_client(new aura::FocusManager); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100)); | 362 ui::PrintLayerHierarchy(root_window->layer(), gfx::Point(100, 100)); |
| 363 #endif | 363 #endif |
| 364 | 364 |
| 365 root_window->ShowRootWindow(); | 365 root_window->ShowRootWindow(); |
| 366 base::MessageLoopForUI::current()->Run(); | 366 base::MessageLoopForUI::current()->Run(); |
| 367 focus_client.reset(); | 367 focus_client.reset(); |
| 368 root_window.reset(); | 368 root_window.reset(); |
| 369 | 369 |
| 370 return 0; | 370 return 0; |
| 371 } | 371 } |
| OLD | NEW |