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/bind.h" | 6 #include "base/bind.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/i18n/icu_util.h" | 8 #include "base/i18n/icu_util.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/string_split.h" | 11 #include "base/string_split.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "third_party/skia/include/core/SkXfermode.h" | 13 #include "third_party/skia/include/core/SkXfermode.h" |
14 #include "ui/aura/env.h" | 14 #include "ui/aura/env.h" |
15 #include "ui/aura/event.h" | 15 #include "ui/aura/event.h" |
16 #include "ui/aura/root_window.h" | 16 #include "ui/aura/root_window.h" |
17 #include "ui/aura/single_monitor_manager.h" | 17 #include "ui/aura/single_display_manager.h" |
18 #include "ui/aura/window.h" | 18 #include "ui/aura/window.h" |
19 #include "ui/base/hit_test.h" | 19 #include "ui/base/hit_test.h" |
20 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
21 #include "ui/base/ui_base_paths.h" | 21 #include "ui/base/ui_base_paths.h" |
22 #include "ui/compositor/compositor.h" | 22 #include "ui/compositor/compositor.h" |
23 #include "ui/compositor/compositor_observer.h" | 23 #include "ui/compositor/compositor_observer.h" |
24 #include "ui/compositor/debug_utils.h" | 24 #include "ui/compositor/debug_utils.h" |
25 #include "ui/compositor/layer.h" | 25 #include "ui/compositor/layer.h" |
26 #include "ui/compositor/test/compositor_test_support.h" | 26 #include "ui/compositor/test/compositor_test_support.h" |
27 #include "ui/gfx/canvas.h" | 27 #include "ui/gfx/canvas.h" |
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 CommandLine::Init(argc, argv); | 275 CommandLine::Init(argc, argv); |
276 | 276 |
277 base::AtExitManager exit_manager; | 277 base::AtExitManager exit_manager; |
278 | 278 |
279 ui::RegisterPathProvider(); | 279 ui::RegisterPathProvider(); |
280 icu_util::Initialize(); | 280 icu_util::Initialize(); |
281 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); | 281 ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); |
282 | 282 |
283 MessageLoop message_loop(MessageLoop::TYPE_UI); | 283 MessageLoop message_loop(MessageLoop::TYPE_UI); |
284 ui::CompositorTestSupport::Initialize(); | 284 ui::CompositorTestSupport::Initialize(); |
285 aura::SingleMonitorManager* manager = new aura::SingleMonitorManager; | 285 aura::SingleDisplayManager* manager = new aura::SingleDisplayManager; |
286 manager->set_use_fullscreen_host_window(true); | 286 manager->set_use_fullscreen_host_window(true); |
287 aura::Env::GetInstance()->SetMonitorManager(manager); | 287 aura::Env::GetInstance()->SetDisplayManager(manager); |
288 scoped_ptr<aura::RootWindow> root_window( | 288 scoped_ptr<aura::RootWindow> root_window( |
289 aura::MonitorManager::CreateRootWindowForPrimaryMonitor()); | 289 aura::DisplayManager::CreateRootWindowForPrimaryDisplay()); |
290 | 290 |
291 // add layers | 291 // add layers |
292 ColoredLayer background(SK_ColorRED); | 292 ColoredLayer background(SK_ColorRED); |
293 background.SetBounds(root_window->bounds()); | 293 background.SetBounds(root_window->bounds()); |
294 root_window->layer()->Add(&background); | 294 root_window->layer()->Add(&background); |
295 | 295 |
296 ColoredLayer window(SK_ColorBLUE); | 296 ColoredLayer window(SK_ColorBLUE); |
297 window.SetBounds(gfx::Rect(background.bounds().size())); | 297 window.SetBounds(gfx::Rect(background.bounds().size())); |
298 background.Add(&window); | 298 background.Add(&window); |
299 | 299 |
(...skipping 29 matching lines...) Expand all Loading... |
329 #endif | 329 #endif |
330 | 330 |
331 root_window->ShowRootWindow(); | 331 root_window->ShowRootWindow(); |
332 MessageLoopForUI::current()->Run(); | 332 MessageLoopForUI::current()->Run(); |
333 root_window.reset(); | 333 root_window.reset(); |
334 | 334 |
335 ui::CompositorTestSupport::Terminate(); | 335 ui::CompositorTestSupport::Terminate(); |
336 | 336 |
337 return 0; | 337 return 0; |
338 } | 338 } |
OLD | NEW |