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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/views/views.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 }
OLDNEW
« 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