| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/i18n/icu_util.h" | 8 #include "base/i18n/icu_util.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); | 73 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); |
| 74 | 74 |
| 75 base::PowerMonitor power_monitor(make_scoped_ptr( | 75 base::PowerMonitor power_monitor(make_scoped_ptr( |
| 76 new base::PowerMonitorDeviceSource)); | 76 new base::PowerMonitorDeviceSource)); |
| 77 | 77 |
| 78 #if defined(OS_WIN) | 78 #if defined(OS_WIN) |
| 79 gfx::win::MaybeInitializeDirectWrite(); | 79 gfx::win::MaybeInitializeDirectWrite(); |
| 80 #endif | 80 #endif |
| 81 | 81 |
| 82 #if defined(USE_AURA) | 82 #if defined(USE_AURA) |
| 83 aura::Env::CreateInstance(true); | 83 scoped_ptr<aura::Env> env = aura::Env::CreateInstance(); |
| 84 aura::Env::GetInstance()->set_context_factory(context_factory.get()); | 84 aura::Env::GetInstance()->set_context_factory(context_factory.get()); |
| 85 #endif | 85 #endif |
| 86 ui::InitializeInputMethodForTesting(); | 86 ui::InitializeInputMethodForTesting(); |
| 87 | 87 |
| 88 { | 88 { |
| 89 views::DesktopTestViewsDelegate views_delegate; | 89 views::DesktopTestViewsDelegate views_delegate; |
| 90 #if defined(USE_AURA) | 90 #if defined(USE_AURA) |
| 91 wm::WMState wm_state; | 91 wm::WMState wm_state; |
| 92 #endif | 92 #endif |
| 93 #if !defined(OS_CHROMEOS) && defined(USE_AURA) | 93 #if !defined(OS_CHROMEOS) && defined(USE_AURA) |
| 94 scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); | 94 scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); |
| 95 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, | 95 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, |
| 96 desktop_screen.get()); | 96 desktop_screen.get()); |
| 97 #endif | 97 #endif |
| 98 | 98 |
| 99 views::examples::ShowExamplesWindow( | 99 views::examples::ShowExamplesWindow( |
| 100 views::examples::QUIT_ON_CLOSE, | 100 views::examples::QUIT_ON_CLOSE, |
| 101 NULL, | 101 NULL, |
| 102 scoped_ptr<ScopedVector<views::examples::ExampleBase> >()); | 102 scoped_ptr<ScopedVector<views::examples::ExampleBase> >()); |
| 103 | 103 |
| 104 base::RunLoop().Run(); | 104 base::RunLoop().Run(); |
| 105 | 105 |
| 106 ui::ResourceBundle::CleanupSharedInstance(); | 106 ui::ResourceBundle::CleanupSharedInstance(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 ui::ShutdownInputMethod(); | 109 ui::ShutdownInputMethod(); |
| 110 | 110 |
| 111 #if defined(USE_AURA) | 111 #if defined(USE_AURA) |
| 112 aura::Env::DeleteInstance(); | 112 env.reset(); |
| 113 #endif | 113 #endif |
| 114 | 114 |
| 115 return 0; | 115 return 0; |
| 116 } | 116 } |
| OLD | NEW |