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

Side by Side Diff: ui/views/examples/examples_main.cc

Issue 262883011: Makes PlatformEventSource creation in Env conditional (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
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/files/file_path.h"
8 #include "base/i18n/icu_util.h" 8 #include "base/i18n/icu_util.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 base::i18n::InitializeICU(); 59 base::i18n::InitializeICU();
60 60
61 base::FilePath pak_dir; 61 base::FilePath pak_dir;
62 PathService::Get(base::DIR_MODULE, &pak_dir); 62 PathService::Get(base::DIR_MODULE, &pak_dir);
63 63
64 base::FilePath pak_file; 64 base::FilePath pak_file;
65 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak")); 65 pak_file = pak_dir.Append(FILE_PATH_LITERAL("ui_test.pak"));
66 66
67 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file); 67 ui::ResourceBundle::InitSharedInstanceWithPakPath(pak_file);
68 68
69 aura::Env::CreateInstance(); 69 aura::Env::CreateInstance(true);
70 70
71 ui::InitializeInputMethodForTesting(); 71 ui::InitializeInputMethodForTesting();
72 72
73 { 73 {
74 views::DesktopTestViewsDelegate views_delegate; 74 views::DesktopTestViewsDelegate views_delegate;
75 wm::WMState wm_state; 75 wm::WMState wm_state;
76 76
77 #if !defined(OS_CHROMEOS) 77 #if !defined(OS_CHROMEOS)
78 scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); 78 scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen());
79 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, 79 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
80 desktop_screen.get()); 80 desktop_screen.get());
81 #endif 81 #endif
82 82
83 views::examples::ShowExamplesWindow( 83 views::examples::ShowExamplesWindow(
84 views::examples::QUIT_ON_CLOSE, 84 views::examples::QUIT_ON_CLOSE,
85 NULL, 85 NULL,
86 scoped_ptr<ScopedVector<views::examples::ExampleBase> >()); 86 scoped_ptr<ScopedVector<views::examples::ExampleBase> >());
87 87
88 base::RunLoop().Run(); 88 base::RunLoop().Run();
89 89
90 ui::ResourceBundle::CleanupSharedInstance(); 90 ui::ResourceBundle::CleanupSharedInstance();
91 } 91 }
92 92
93 ui::ShutdownInputMethod(); 93 ui::ShutdownInputMethod();
94 94
95 aura::Env::DeleteInstance(); 95 aura::Env::DeleteInstance();
96 96
97 return 0; 97 return 0;
98 } 98 }
OLDNEW
« no previous file with comments | « ui/views/examples/content_client/examples_browser_main_parts.cc ('k') | ui/wm/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698