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