| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Create the message-loop here before creating the root window. | 143 // Create the message-loop here before creating the root window. |
| 144 base::MessageLoopForUI message_loop; | 144 base::MessageLoopForUI message_loop; |
| 145 | 145 |
| 146 base::PowerMonitor power_monitor(make_scoped_ptr( | 146 base::PowerMonitor power_monitor(make_scoped_ptr( |
| 147 new base::PowerMonitorDeviceSource)); | 147 new base::PowerMonitorDeviceSource)); |
| 148 | 148 |
| 149 aura::Env::CreateInstance(true); | 149 aura::Env::CreateInstance(true); |
| 150 aura::Env::GetInstance()->set_context_factory(context_factory.get()); | 150 aura::Env::GetInstance()->set_context_factory(context_factory.get()); |
| 151 scoped_ptr<aura::TestScreen> test_screen( | 151 scoped_ptr<aura::TestScreen> test_screen( |
| 152 aura::TestScreen::Create(gfx::Size())); | 152 aura::TestScreen::Create(gfx::Size())); |
| 153 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, test_screen.get()); | 153 gfx::Screen::SetScreenInstance(test_screen.get()); |
| 154 scoped_ptr<aura::WindowTreeHost> host( | 154 scoped_ptr<aura::WindowTreeHost> host( |
| 155 test_screen->CreateHostForPrimaryDisplay()); | 155 test_screen->CreateHostForPrimaryDisplay()); |
| 156 scoped_ptr<DemoWindowTreeClient> window_tree_client( | 156 scoped_ptr<DemoWindowTreeClient> window_tree_client( |
| 157 new DemoWindowTreeClient(host->window())); | 157 new DemoWindowTreeClient(host->window())); |
| 158 aura::test::TestFocusClient focus_client; | 158 aura::test::TestFocusClient focus_client; |
| 159 aura::client::SetFocusClient(host->window(), &focus_client); | 159 aura::client::SetFocusClient(host->window(), &focus_client); |
| 160 | 160 |
| 161 // Create a hierarchy of test windows. | 161 // Create a hierarchy of test windows. |
| 162 gfx::Rect window1_bounds(100, 100, 400, 400); | 162 gfx::Rect window1_bounds(100, 100, 400, 400); |
| 163 DemoWindowDelegate window_delegate1(SK_ColorBLUE); | 163 DemoWindowDelegate window_delegate1(SK_ColorBLUE); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 197 int main(int argc, char** argv) { | 197 int main(int argc, char** argv) { |
| 198 base::CommandLine::Init(argc, argv); | 198 base::CommandLine::Init(argc, argv); |
| 199 | 199 |
| 200 // The exit manager is in charge of calling the dtors of singleton objects. | 200 // The exit manager is in charge of calling the dtors of singleton objects. |
| 201 base::AtExitManager exit_manager; | 201 base::AtExitManager exit_manager; |
| 202 | 202 |
| 203 base::i18n::InitializeICU(); | 203 base::i18n::InitializeICU(); |
| 204 | 204 |
| 205 return DemoMain(); | 205 return DemoMain(); |
| 206 } | 206 } |
| OLD | NEW |