Index: ui/views/examples/examples_main.cc |
diff --git a/ui/views/examples/examples_main.cc b/ui/views/examples/examples_main.cc |
index dc8b7aca5d403857828486839cd1da698cfe0489..d9fc66bf017f1f1afe0f748b963a40c853e172d0 100644 |
--- a/ui/views/examples/examples_main.cc |
+++ b/ui/views/examples/examples_main.cc |
@@ -4,16 +4,39 @@ |
#include "base/at_exit.h" |
#include "base/command_line.h" |
+#include "base/files/file_path.h" |
#include "base/message_loop/message_loop.h" |
+#include "base/path_service.h" |
#include "base/run_loop.h" |
+#include "ui/base/resource/resource_bundle.h" |
+#include "ui/gfx/screen.h" |
+ |
+#if !defined(OS_CHROMEOS) |
+#include "ui/views/widget/desktop_aura/desktop_screen.h" |
+#endif |
int main(int argc, char** argv) { |
- base::AtExitManager at_exit; |
CommandLine::Init(argc, argv); |
+ base::AtExitManager at_exit; |
base::MessageLoopForUI message_loop; |
+ base::FilePath pak_dir; |
+ PathService::Get(base::DIR_MODULE, &pak_dir); |
+ |
+ base::FilePath pak_file; |
+ pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); |
+ |
+ ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); |
+ |
+#if !defined(OS_CHROMEOS) |
+ scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); |
+ gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, desktop_screen.get()); |
+#endif |
+ |
base::RunLoop().Run(); |
+ ui::ResourceBundle::CleanupSharedInstance(); |
+ |
return 0; |
} |