| 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 #if defined(USE_X11) | 5 #if defined(USE_X11) |
| 6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #include "base/at_exit.h" | 9 #include "base/at_exit.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 scoped_ptr<ui::InProcessContextFactory> context_factory( | 321 scoped_ptr<ui::InProcessContextFactory> context_factory( |
| 322 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); | 322 new ui::InProcessContextFactory(context_factory_for_test, nullptr)); |
| 323 | 323 |
| 324 base::i18n::InitializeICU(); | 324 base::i18n::InitializeICU(); |
| 325 | 325 |
| 326 base::MessageLoopForUI message_loop; | 326 base::MessageLoopForUI message_loop; |
| 327 aura::Env::CreateInstance(true); | 327 aura::Env::CreateInstance(true); |
| 328 aura::Env::GetInstance()->set_context_factory(context_factory.get()); | 328 aura::Env::GetInstance()->set_context_factory(context_factory.get()); |
| 329 scoped_ptr<aura::TestScreen> test_screen( | 329 scoped_ptr<aura::TestScreen> test_screen( |
| 330 aura::TestScreen::Create(GetFullscreenSize())); | 330 aura::TestScreen::Create(GetFullscreenSize())); |
| 331 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); | 331 gfx::Screen::SetScreenInstance(test_screen.get()); |
| 332 scoped_ptr<aura::WindowTreeHost> host( | 332 scoped_ptr<aura::WindowTreeHost> host( |
| 333 test_screen->CreateHostForPrimaryDisplay()); | 333 test_screen->CreateHostForPrimaryDisplay()); |
| 334 aura::client::SetCaptureClient( | 334 aura::client::SetCaptureClient( |
| 335 host->window(), | 335 host->window(), |
| 336 new aura::client::DefaultCaptureClient(host->window())); | 336 new aura::client::DefaultCaptureClient(host->window())); |
| 337 | 337 |
| 338 scoped_ptr<aura::client::FocusClient> focus_client( | 338 scoped_ptr<aura::client::FocusClient> focus_client( |
| 339 new aura::test::TestFocusClient); | 339 new aura::test::TestFocusClient); |
| 340 aura::client::SetFocusClient(host->window(), focus_client.get()); | 340 aura::client::SetFocusClient(host->window(), focus_client.get()); |
| 341 | 341 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100)); | 380 ui::PrintLayerHierarchy(host->window()->layer(), gfx::Point(100, 100)); |
| 381 #endif | 381 #endif |
| 382 | 382 |
| 383 host->Show(); | 383 host->Show(); |
| 384 base::MessageLoopForUI::current()->Run(); | 384 base::MessageLoopForUI::current()->Run(); |
| 385 focus_client.reset(); | 385 focus_client.reset(); |
| 386 host.reset(); | 386 host.reset(); |
| 387 | 387 |
| 388 return 0; | 388 return 0; |
| 389 } | 389 } |
| OLD | NEW |