| 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 <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/i18n/icu_util.h" | 10 #include "base/i18n/icu_util.h" |
| 11 #include "base/memory/ptr_util.h" | 11 #include "base/memory/ptr_util.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
| 14 #include "base/power_monitor/power_monitor.h" | 14 #include "base/power_monitor/power_monitor.h" |
| 15 #include "base/power_monitor/power_monitor_device_source.h" | 15 #include "base/power_monitor/power_monitor_device_source.h" |
| 16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 17 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 18 #include "ui/base/ime/input_method_initializer.h" | 18 #include "ui/base/ime/input_method_initializer.h" |
| 19 #include "ui/base/material_design/material_design_controller.h" | 19 #include "ui/base/material_design/material_design_controller.h" |
| 20 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
| 21 #include "ui/base/ui_base_paths.h" | 21 #include "ui/base/ui_base_paths.h" |
| 22 #include "ui/compositor/test/in_process_context_factory.h" | 22 #include "ui/compositor/test/in_process_context_factory.h" |
| 23 #include "ui/gfx/screen.h" | 23 #include "ui/display/screen.h" |
| 24 #include "ui/gl/gl_surface.h" | 24 #include "ui/gl/gl_surface.h" |
| 25 #include "ui/views/examples/example_base.h" | 25 #include "ui/views/examples/example_base.h" |
| 26 #include "ui/views/examples/examples_window.h" | 26 #include "ui/views/examples/examples_window.h" |
| 27 #include "ui/views/test/desktop_test_views_delegate.h" | 27 #include "ui/views/test/desktop_test_views_delegate.h" |
| 28 | 28 |
| 29 #if defined(USE_AURA) | 29 #if defined(USE_AURA) |
| 30 #include "ui/aura/env.h" | 30 #include "ui/aura/env.h" |
| 31 #include "ui/wm/core/wm_state.h" | 31 #include "ui/wm/core/wm_state.h" |
| 32 #endif | 32 #endif |
| 33 | 33 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 ui::InitializeInputMethodForTesting(); | 91 ui::InitializeInputMethodForTesting(); |
| 92 ui::MaterialDesignController::Initialize(); | 92 ui::MaterialDesignController::Initialize(); |
| 93 | 93 |
| 94 { | 94 { |
| 95 views::DesktopTestViewsDelegate views_delegate; | 95 views::DesktopTestViewsDelegate views_delegate; |
| 96 #if defined(USE_AURA) | 96 #if defined(USE_AURA) |
| 97 wm::WMState wm_state; | 97 wm::WMState wm_state; |
| 98 #endif | 98 #endif |
| 99 #if !defined(OS_CHROMEOS) && defined(USE_AURA) | 99 #if !defined(OS_CHROMEOS) && defined(USE_AURA) |
| 100 std::unique_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); | 100 std::unique_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); |
| 101 gfx::Screen::SetScreenInstance(desktop_screen.get()); | 101 display::Screen::SetScreenInstance(desktop_screen.get()); |
| 102 #endif | 102 #endif |
| 103 | 103 |
| 104 views::examples::ShowExamplesWindow( | 104 views::examples::ShowExamplesWindow( |
| 105 views::examples::QUIT_ON_CLOSE, nullptr, | 105 views::examples::QUIT_ON_CLOSE, nullptr, |
| 106 std::unique_ptr<ScopedVector<views::examples::ExampleBase>>()); | 106 std::unique_ptr<ScopedVector<views::examples::ExampleBase>>()); |
| 107 | 107 |
| 108 base::RunLoop().Run(); | 108 base::RunLoop().Run(); |
| 109 | 109 |
| 110 ui::ResourceBundle::CleanupSharedInstance(); | 110 ui::ResourceBundle::CleanupSharedInstance(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 ui::ShutdownInputMethod(); | 113 ui::ShutdownInputMethod(); |
| 114 | 114 |
| 115 #if defined(USE_AURA) | 115 #if defined(USE_AURA) |
| 116 env.reset(); | 116 env.reset(); |
| 117 #endif | 117 #endif |
| 118 | 118 |
| 119 return 0; | 119 return 0; |
| 120 } | 120 } |
| OLD | NEW |