OLD | NEW |
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 DISALLOW_COPY_AND_ASSIGN(DemoWindowTreeClient); | 105 DISALLOW_COPY_AND_ASSIGN(DemoWindowTreeClient); |
106 }; | 106 }; |
107 | 107 |
108 int DemoMain() { | 108 int DemoMain() { |
109 // Create the message-loop here before creating the root window. | 109 // Create the message-loop here before creating the root window. |
110 base::MessageLoopForUI message_loop; | 110 base::MessageLoopForUI message_loop; |
111 | 111 |
112 gfx::GLSurface::InitializeOneOff(); | 112 gfx::GLSurface::InitializeOneOff(); |
113 | 113 |
114 // The ContextFactory must exist before any Compositors are created. | 114 // The ContextFactory must exist before any Compositors are created. |
115 bool allow_test_contexts = false; | 115 bool enable_pixel_output = true; |
116 ui::InitializeContextFactoryForTests(allow_test_contexts); | 116 ui::InitializeContextFactoryForTests(enable_pixel_output); |
117 | 117 |
118 aura::Env::CreateInstance(); | 118 aura::Env::CreateInstance(); |
119 scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create()); | 119 scoped_ptr<aura::TestScreen> test_screen(aura::TestScreen::Create()); |
120 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); | 120 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); |
121 scoped_ptr<aura::RootWindow> root_window( | 121 scoped_ptr<aura::RootWindow> root_window( |
122 test_screen->CreateRootWindowForPrimaryDisplay()); | 122 test_screen->CreateRootWindowForPrimaryDisplay()); |
123 scoped_ptr<DemoWindowTreeClient> window_tree_client(new DemoWindowTreeClient( | 123 scoped_ptr<DemoWindowTreeClient> window_tree_client(new DemoWindowTreeClient( |
124 root_window->window())); | 124 root_window->window())); |
125 aura::test::TestFocusClient focus_client; | 125 aura::test::TestFocusClient focus_client; |
126 aura::client::SetFocusClient(root_window->window(), &focus_client); | 126 aura::client::SetFocusClient(root_window->window(), &focus_client); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 int main(int argc, char** argv) { | 163 int main(int argc, char** argv) { |
164 CommandLine::Init(argc, argv); | 164 CommandLine::Init(argc, argv); |
165 | 165 |
166 // The exit manager is in charge of calling the dtors of singleton objects. | 166 // The exit manager is in charge of calling the dtors of singleton objects. |
167 base::AtExitManager exit_manager; | 167 base::AtExitManager exit_manager; |
168 | 168 |
169 base::i18n::InitializeICU(); | 169 base::i18n::InitializeICU(); |
170 | 170 |
171 return DemoMain(); | 171 return DemoMain(); |
172 } | 172 } |
OLD | NEW |