| 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 <memory> | 5 #include <memory> |
| 6 | 6 |
| 7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/i18n/icu_util.h" | 9 #include "base/i18n/icu_util.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 base::MessageLoopForUI message_loop; | 146 base::MessageLoopForUI message_loop; |
| 147 | 147 |
| 148 base::PowerMonitor power_monitor( | 148 base::PowerMonitor power_monitor( |
| 149 base::WrapUnique(new base::PowerMonitorDeviceSource)); | 149 base::WrapUnique(new base::PowerMonitorDeviceSource)); |
| 150 | 150 |
| 151 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance(); | 151 std::unique_ptr<aura::Env> env = aura::Env::CreateInstance(); |
| 152 env->set_context_factory(context_factory.get()); | 152 env->set_context_factory(context_factory.get()); |
| 153 std::unique_ptr<aura::TestScreen> test_screen( | 153 std::unique_ptr<aura::TestScreen> test_screen( |
| 154 aura::TestScreen::Create(gfx::Size())); | 154 aura::TestScreen::Create(gfx::Size())); |
| 155 display::Screen::SetScreenInstance(test_screen.get()); | 155 display::Screen::SetScreenInstance(test_screen.get()); |
| 156 std::unique_ptr<aura::WindowTreeHost> host( | 156 test_screen->CreateHostForPrimaryDisplay(); |
| 157 test_screen->CreateHostForPrimaryDisplay()); | 157 aura::WindowTreeHost* host = test_screen->host(); |
| 158 std::unique_ptr<DemoWindowTreeClient> window_tree_client( | 158 std::unique_ptr<DemoWindowTreeClient> window_tree_client( |
| 159 new DemoWindowTreeClient(host->window())); | 159 new DemoWindowTreeClient(host->window())); |
| 160 aura::test::TestFocusClient focus_client; | 160 aura::test::TestFocusClient focus_client; |
| 161 aura::client::SetFocusClient(host->window(), &focus_client); | 161 aura::client::SetFocusClient(host->window(), &focus_client); |
| 162 | 162 |
| 163 // Create a hierarchy of test windows. | 163 // Create a hierarchy of test windows. |
| 164 gfx::Rect window1_bounds(100, 100, 400, 400); | 164 gfx::Rect window1_bounds(100, 100, 400, 400); |
| 165 DemoWindowDelegate window_delegate1(SK_ColorBLUE); | 165 DemoWindowDelegate window_delegate1(SK_ColorBLUE); |
| 166 aura::Window window1(&window_delegate1); | 166 aura::Window window1(&window_delegate1); |
| 167 window1.set_id(1); | 167 window1.set_id(1); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 int main(int argc, char** argv) { | 199 int main(int argc, char** argv) { |
| 200 base::CommandLine::Init(argc, argv); | 200 base::CommandLine::Init(argc, argv); |
| 201 | 201 |
| 202 // The exit manager is in charge of calling the dtors of singleton objects. | 202 // The exit manager is in charge of calling the dtors of singleton objects. |
| 203 base::AtExitManager exit_manager; | 203 base::AtExitManager exit_manager; |
| 204 | 204 |
| 205 base::i18n::InitializeICU(); | 205 base::i18n::InitializeICU(); |
| 206 | 206 |
| 207 return DemoMain(); | 207 return DemoMain(); |
| 208 } | 208 } |
| OLD | NEW |