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

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

Issue 292423004: Views Examples: Set Aura Env context factory (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
« no previous file with comments | « no previous file | no next file » | 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/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 59
60 base::i18n::InitializeICU(); 60 base::i18n::InitializeICU();
61 61
62 ui::RegisterPathProvider(); 62 ui::RegisterPathProvider();
63 63
64 base::FilePath ui_test_pak_path; 64 base::FilePath ui_test_pak_path;
65 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path)); 65 DCHECK(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
66 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path); 66 ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
67 67
68 aura::Env::CreateInstance(true); 68 aura::Env::CreateInstance(true);
69 aura::Env::GetInstance()->set_context_factory(context_factory.get());
69 70
70 ui::InitializeInputMethodForTesting(); 71 ui::InitializeInputMethodForTesting();
71 72
72 { 73 {
73 views::DesktopTestViewsDelegate views_delegate; 74 views::DesktopTestViewsDelegate views_delegate;
74 wm::WMState wm_state; 75 wm::WMState wm_state;
75 76
76 #if !defined(OS_CHROMEOS) 77 #if !defined(OS_CHROMEOS)
77 scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen()); 78 scoped_ptr<gfx::Screen> desktop_screen(views::CreateDesktopScreen());
78 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, 79 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
79 desktop_screen.get()); 80 desktop_screen.get());
80 #endif 81 #endif
81 82
82 views::examples::ShowExamplesWindow( 83 views::examples::ShowExamplesWindow(
83 views::examples::QUIT_ON_CLOSE, 84 views::examples::QUIT_ON_CLOSE,
84 NULL, 85 NULL,
85 scoped_ptr<ScopedVector<views::examples::ExampleBase> >()); 86 scoped_ptr<ScopedVector<views::examples::ExampleBase> >());
86 87
87 base::RunLoop().Run(); 88 base::RunLoop().Run();
88 89
89 ui::ResourceBundle::CleanupSharedInstance(); 90 ui::ResourceBundle::CleanupSharedInstance();
90 } 91 }
91 92
92 ui::ShutdownInputMethod(); 93 ui::ShutdownInputMethod();
93 94
94 aura::Env::DeleteInstance(); 95 aura::Env::DeleteInstance();
95 96
96 return 0; 97 return 0;
97 } 98 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698