| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/main/athena_launcher.h" | 5 #include "athena/main/athena_launcher.h" |
| 6 | 6 |
| 7 #include "athena/activity/public/activity_factory.h" | 7 #include "athena/activity/public/activity_factory.h" |
| 8 #include "athena/activity/public/activity_manager.h" | 8 #include "athena/activity/public/activity_manager.h" |
| 9 #include "athena/content/public/app_registry.h" |
| 9 #include "athena/content/public/content_activity_factory.h" | 10 #include "athena/content/public/content_activity_factory.h" |
| 10 #include "athena/content/public/content_app_model_builder.h" | 11 #include "athena/content/public/content_app_model_builder.h" |
| 11 #include "athena/home/public/home_card.h" | 12 #include "athena/home/public/home_card.h" |
| 12 #include "athena/home/public/home_card.h" | 13 #include "athena/home/public/home_card.h" |
| 13 #include "athena/input/public/input_manager.h" | 14 #include "athena/input/public/input_manager.h" |
| 14 #include "athena/main/debug/debug_window.h" | 15 #include "athena/main/debug/debug_window.h" |
| 15 #include "athena/main/placeholder.h" | 16 #include "athena/main/placeholder.h" |
| 16 #include "athena/main/placeholder.h" | 17 #include "athena/main/placeholder.h" |
| 17 #include "athena/main/url_search_provider.h" | 18 #include "athena/main/url_search_provider.h" |
| 18 #include "athena/screen/public/screen_manager.h" | 19 #include "athena/screen/public/screen_manager.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 | 112 |
| 112 aura::client::SetVisibilityClient(root_window, | 113 aura::client::SetVisibilityClient(root_window, |
| 113 env_state->visibility_client.get()); | 114 env_state->visibility_client.get()); |
| 114 | 115 |
| 115 athena::SystemUI::Create( | 116 athena::SystemUI::Create( |
| 116 content::BrowserThread::GetMessageLoopProxyForThread( | 117 content::BrowserThread::GetMessageLoopProxyForThread( |
| 117 content::BrowserThread::FILE)); | 118 content::BrowserThread::FILE)); |
| 118 athena::InputManager::Create()->OnRootWindowCreated(root_window); | 119 athena::InputManager::Create()->OnRootWindowCreated(root_window); |
| 119 athena::ScreenManager::Create(root_window); | 120 athena::ScreenManager::Create(root_window); |
| 120 athena::WindowManager::Create(); | 121 athena::WindowManager::Create(); |
| 122 athena::AppRegistry::Create(); |
| 121 SetupBackgroundImage(); | 123 SetupBackgroundImage(); |
| 122 | 124 |
| 123 athena::ScreenManager::Get()->GetContext()->SetProperty( | 125 athena::ScreenManager::Get()->GetContext()->SetProperty( |
| 124 kAthenaEnvStateKey, env_state); | 126 kAthenaEnvStateKey, env_state); |
| 125 } | 127 } |
| 126 | 128 |
| 127 void StartAthenaSessionWithContext(content::BrowserContext* context) { | 129 void StartAthenaSessionWithContext(content::BrowserContext* context) { |
| 128 StartAthenaSession(new athena::ContentActivityFactory(), | 130 StartAthenaSession(new athena::ContentActivityFactory(), |
| 129 new athena::ContentAppModelBuilder(context)); | 131 new athena::ContentAppModelBuilder(context)); |
| 130 athena::VirtualKeyboardManager::Create(context); | 132 athena::VirtualKeyboardManager::Create(context); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 143 athena::AppModelBuilder* app_model_builder) { | 145 athena::AppModelBuilder* app_model_builder) { |
| 144 athena::HomeCard::Create(app_model_builder); | 146 athena::HomeCard::Create(app_model_builder); |
| 145 athena::ActivityManager::Create(); | 147 athena::ActivityManager::Create(); |
| 146 athena::ActivityFactory::RegisterActivityFactory(activity_factory); | 148 athena::ActivityFactory::RegisterActivityFactory(activity_factory); |
| 147 } | 149 } |
| 148 | 150 |
| 149 void ShutdownAthena() { | 151 void ShutdownAthena() { |
| 150 athena::ActivityFactory::Shutdown(); | 152 athena::ActivityFactory::Shutdown(); |
| 151 athena::ActivityManager::Shutdown(); | 153 athena::ActivityManager::Shutdown(); |
| 152 athena::HomeCard::Shutdown(); | 154 athena::HomeCard::Shutdown(); |
| 155 athena::AppRegistry::ShutDown(); |
| 153 athena::WindowManager::Shutdown(); | 156 athena::WindowManager::Shutdown(); |
| 154 athena::ScreenManager::Shutdown(); | 157 athena::ScreenManager::Shutdown(); |
| 155 athena::InputManager::Shutdown(); | 158 athena::InputManager::Shutdown(); |
| 156 athena::SystemUI::Shutdown(); | 159 athena::SystemUI::Shutdown(); |
| 157 | 160 |
| 158 delete views::ViewsDelegate::views_delegate; | 161 delete views::ViewsDelegate::views_delegate; |
| 159 } | 162 } |
| 160 | 163 |
| 161 } // namespace athena | 164 } // namespace athena |
| OLD | NEW |