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

Side by Side Diff: ui/aura/demo/demo_main.cc

Issue 306123007: Removes usage of Compositor/ContextFactory methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | « ui/aura/bench/bench_main.cc ('k') | ui/compositor/test/context_factories_for_test.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/i18n/icu_util.h" 7 #include "base/i18n/icu_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "third_party/skia/include/core/SkXfermode.h" 10 #include "third_party/skia/include/core/SkXfermode.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 gfx::GLSurface::InitializeOneOff(); 117 gfx::GLSurface::InitializeOneOff();
118 118
119 #if defined(OS_WIN) 119 #if defined(OS_WIN)
120 gfx::InitDeviceScaleFactor(1.0f); 120 gfx::InitDeviceScaleFactor(1.0f);
121 #endif 121 #endif
122 122
123 // The ContextFactory must exist before any Compositors are created. 123 // The ContextFactory must exist before any Compositors are created.
124 scoped_ptr<ui::InProcessContextFactory> context_factory( 124 scoped_ptr<ui::InProcessContextFactory> context_factory(
125 new ui::InProcessContextFactory()); 125 new ui::InProcessContextFactory());
126 ui::ContextFactory::SetInstance(context_factory.get());
127 126
128 // Create the message-loop here before creating the root window. 127 // Create the message-loop here before creating the root window.
129 base::MessageLoopForUI message_loop; 128 base::MessageLoopForUI message_loop;
130 129
131 aura::Env::CreateInstance(true); 130 aura::Env::CreateInstance(true);
132 aura::Env::GetInstance()->set_context_factory(context_factory.get()); 131 aura::Env::GetInstance()->set_context_factory(context_factory.get());
133 scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create()); 132 scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create());
134 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); 133 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get());
135 scoped_ptr<aura::WindowTreeHost> host( 134 scoped_ptr<aura::WindowTreeHost> host(
136 test_screen->CreateHostForPrimaryDisplay()); 135 test_screen->CreateHostForPrimaryDisplay());
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 int main(int argc, char** argv) { 174 int main(int argc, char** argv) {
176 CommandLine::Init(argc, argv); 175 CommandLine::Init(argc, argv);
177 176
178 // The exit manager is in charge of calling the dtors of singleton objects. 177 // The exit manager is in charge of calling the dtors of singleton objects.
179 base::AtExitManager exit_manager; 178 base::AtExitManager exit_manager;
180 179
181 base::i18n::InitializeICU(); 180 base::i18n::InitializeICU();
182 181
183 return DemoMain(); 182 return DemoMain();
184 } 183 }
OLDNEW
« no previous file with comments | « ui/aura/bench/bench_main.cc ('k') | ui/compositor/test/context_factories_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698