OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.h" | 9 #include "base/message_loop.h" |
10 #include "ui/aura/desktop.h" | 10 #include "ui/aura/desktop.h" |
11 #include "ui/aura_shell/examples/toplevel_window.h" | 11 #include "ui/aura_shell/examples/toplevel_window.h" |
12 #include "ui/aura_shell/launcher/launcher_types.h" | 12 #include "ui/aura_shell/launcher/launcher_types.h" |
13 #include "ui/aura_shell/shell.h" | 13 #include "ui/aura_shell/shell.h" |
14 #include "ui/aura_shell/shell_delegate.h" | 14 #include "ui/aura_shell/shell_delegate.h" |
15 #include "ui/aura_shell/shell_factory.h" | 15 #include "ui/aura_shell/shell_factory.h" |
16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
17 #include "ui/base/ui_base_paths.h" | 17 #include "ui/base/ui_base_paths.h" |
| 18 #include "ui/gfx/compositor/compositor_test_support.h" |
18 | 19 |
19 namespace { | 20 namespace { |
20 | 21 |
21 class ShellDelegateImpl : public aura_shell::ShellDelegate { | 22 class ShellDelegateImpl : public aura_shell::ShellDelegate { |
22 public: | 23 public: |
23 ShellDelegateImpl() { | 24 ShellDelegateImpl() { |
24 } | 25 } |
25 | 26 |
26 virtual void CreateNewWindow() OVERRIDE { | 27 virtual void CreateNewWindow() OVERRIDE { |
27 aura_shell::examples::ToplevelWindow::CreateParams create_params; | 28 aura_shell::examples::ToplevelWindow::CreateParams create_params; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 63 |
63 // The exit manager is in charge of calling the dtors of singleton objects. | 64 // The exit manager is in charge of calling the dtors of singleton objects. |
64 base::AtExitManager exit_manager; | 65 base::AtExitManager exit_manager; |
65 | 66 |
66 ui::RegisterPathProvider(); | 67 ui::RegisterPathProvider(); |
67 icu_util::Initialize(); | 68 icu_util::Initialize(); |
68 ResourceBundle::InitSharedInstance("en-US"); | 69 ResourceBundle::InitSharedInstance("en-US"); |
69 | 70 |
70 // Create the message-loop here before creating the desktop. | 71 // Create the message-loop here before creating the desktop. |
71 MessageLoop message_loop(MessageLoop::TYPE_UI); | 72 MessageLoop message_loop(MessageLoop::TYPE_UI); |
| 73 ui::CompositorTestSupport::Initialize(); |
72 | 74 |
73 aura_shell::Shell::GetInstance()->SetDelegate(new ShellDelegateImpl);; | 75 aura_shell::Shell::GetInstance()->SetDelegate(new ShellDelegateImpl);; |
74 | 76 |
75 aura_shell::examples::InitWindowTypeLauncher(); | 77 aura_shell::examples::InitWindowTypeLauncher(); |
76 | 78 |
77 aura::Desktop::GetInstance()->Run(); | 79 aura::Desktop::GetInstance()->Run(); |
78 | 80 |
79 delete aura::Desktop::GetInstance(); | 81 delete aura::Desktop::GetInstance(); |
80 | 82 |
| 83 ui::CompositorTestSupport::Terminate(); |
| 84 |
81 return 0; | 85 return 0; |
82 } | 86 } |
83 | 87 |
OLD | NEW |