Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: ui/views/examples/examples_main.cc

Issue 108513015: Set up more pieces necessary to show the main Window for views_examples_exe. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698