| 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/shell.h" |
| 11 #include "ui/aura_shell/shell_factory.h" | 12 #include "ui/aura_shell/shell_factory.h" |
| 12 #include "ui/base/resource/resource_bundle.h" | 13 #include "ui/base/resource/resource_bundle.h" |
| 13 #include "ui/base/ui_base_paths.h" | 14 #include "ui/base/ui_base_paths.h" |
| 14 | 15 |
| 15 int main(int argc, char** argv) { | 16 int main(int argc, char** argv) { |
| 16 CommandLine::Init(argc, argv); | 17 CommandLine::Init(argc, argv); |
| 17 | 18 |
| 18 // The exit manager is in charge of calling the dtors of singleton objects. | 19 // The exit manager is in charge of calling the dtors of singleton objects. |
| 19 base::AtExitManager exit_manager; | 20 base::AtExitManager exit_manager; |
| 20 | 21 |
| 21 ui::RegisterPathProvider(); | 22 ui::RegisterPathProvider(); |
| 22 icu_util::Initialize(); | 23 icu_util::Initialize(); |
| 23 ResourceBundle::InitSharedInstance("en-US"); | 24 ResourceBundle::InitSharedInstance("en-US"); |
| 24 | 25 |
| 25 // Create the message-loop here before creating the desktop. | 26 // Create the message-loop here before creating the desktop. |
| 26 MessageLoop message_loop(MessageLoop::TYPE_UI); | 27 MessageLoop message_loop(MessageLoop::TYPE_UI); |
| 27 | 28 |
| 28 aura_shell::InitDesktopWindow(); | 29 aura_shell::Shell shell; |
| 30 shell.Init(); |
| 29 | 31 |
| 30 aura_shell::examples::InitWindowTypeLauncher(); | 32 aura_shell::examples::InitWindowTypeLauncher(); |
| 31 | 33 |
| 32 aura::Desktop::GetInstance()->Run(); | 34 aura::Desktop::GetInstance()->Run(); |
| 33 | 35 |
| 34 delete aura::Desktop::GetInstance(); | 36 delete aura::Desktop::GetInstance(); |
| 35 | 37 |
| 36 return 0; | 38 return 0; |
| 37 } | 39 } |
| 38 | 40 |
| OLD | NEW |