| 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/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/path_service.h" |
| 8 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| 11 #include "ui/base/resource/resource_bundle.h" |
| 12 #include "ui/gfx/screen.h" |
| 13 |
| 14 #if !defined(OS_CHROMEOS) |
| 15 #include "ui/views/widget/desktop_aura/desktop_screen.h" |
| 16 #endif |
| 9 | 17 |
| 10 int main(int argc, char** argv) { | 18 int main(int argc, char** argv) { |
| 11 base::AtExitManager at_exit; | |
| 12 CommandLine::Init(argc, argv); | 19 CommandLine::Init(argc, argv); |
| 13 | 20 |
| 21 base::AtExitManager at_exit; |
| 14 base::MessageLoopForUI message_loop; | 22 base::MessageLoopForUI message_loop; |
| 15 | 23 |
| 24 base::FilePath pak_dir; |
| 25 PathService::Get(base::DIR_MODULE, &pak_dir); |
| 26 |
| 27 base::FilePath pak_file; |
| 28 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); |
| 29 |
| 30 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); |
| 31 |
| 32 #if !defined(OS_CHROMEOS) |
| 33 scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); |
| 34 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, desktop_screen.get()); |
| 35 #endif |
| 36 |
| 16 base::RunLoop().Run(); | 37 base::RunLoop().Run(); |
| 17 | 38 |
| 39 ui::ResourceBundle::CleanupSharedInstance(); |
| 40 |
| 18 return 0; | 41 return 0; |
| 19 } | 42 } |
| OLD | NEW |