| 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/app_registry.h" |
| 10 #include "athena/content/public/content_activity_factory.h" | 10 #include "athena/content/public/content_activity_factory.h" |
| 11 #include "athena/content/public/content_app_model_builder.h" | 11 #include "athena/content/public/content_app_model_builder.h" |
| 12 #include "athena/extensions/public/extensions_delegate.h" |
| 12 #include "athena/home/public/home_card.h" | 13 #include "athena/home/public/home_card.h" |
| 13 #include "athena/home/public/home_card.h" | 14 #include "athena/home/public/home_card.h" |
| 14 #include "athena/input/public/input_manager.h" | 15 #include "athena/input/public/input_manager.h" |
| 15 #include "athena/main/debug/debug_window.h" | 16 #include "athena/main/debug/debug_window.h" |
| 16 #include "athena/main/placeholder.h" | 17 #include "athena/main/placeholder.h" |
| 17 #include "athena/main/placeholder.h" | 18 #include "athena/main/placeholder.h" |
| 18 #include "athena/main/url_search_provider.h" | 19 #include "athena/main/url_search_provider.h" |
| 19 #include "athena/screen/public/screen_manager.h" | 20 #include "athena/screen/public/screen_manager.h" |
| 20 #include "athena/screen/public/screen_manager.h" | 21 #include "athena/screen/public/screen_manager.h" |
| 21 #include "athena/system/public/system_ui.h" | 22 #include "athena/system/public/system_ui.h" |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 athena::ScreenManager::Create(delegate, root_window); | 120 athena::ScreenManager::Create(delegate, root_window); |
| 120 athena::WindowManager::Create(); | 121 athena::WindowManager::Create(); |
| 121 athena::AppRegistry::Create(); | 122 athena::AppRegistry::Create(); |
| 122 SetupBackgroundImage(); | 123 SetupBackgroundImage(); |
| 123 | 124 |
| 124 athena::ScreenManager::Get()->GetContext()->SetProperty( | 125 athena::ScreenManager::Get()->GetContext()->SetProperty( |
| 125 kAthenaEnvStateKey, env_state); | 126 kAthenaEnvStateKey, env_state); |
| 126 } | 127 } |
| 127 | 128 |
| 128 void StartAthenaSessionWithContext(content::BrowserContext* context) { | 129 void StartAthenaSessionWithContext(content::BrowserContext* context) { |
| 130 athena::ExtensionsDelegate::CreateExtensionsDelegateForShell(context); |
| 129 StartAthenaSession(new athena::ContentActivityFactory(), | 131 StartAthenaSession(new athena::ContentActivityFactory(), |
| 130 new athena::ContentAppModelBuilder(context)); | 132 new athena::ContentAppModelBuilder(context)); |
| 131 athena::VirtualKeyboardManager::Create(context); | 133 athena::VirtualKeyboardManager::Create(context); |
| 132 athena::HomeCard::Get()->RegisterSearchProvider( | 134 athena::HomeCard::Get()->RegisterSearchProvider( |
| 133 new athena::UrlSearchProvider(context)); | 135 new athena::UrlSearchProvider(context)); |
| 134 AthenaEnvState* env_state = | 136 AthenaEnvState* env_state = |
| 135 athena::ScreenManager::Get()->GetContext()->GetProperty( | 137 athena::ScreenManager::Get()->GetContext()->GetProperty( |
| 136 kAthenaEnvStateKey); | 138 kAthenaEnvStateKey); |
| 137 | 139 |
| 138 env_state->virtual_keyboard_observer.reset(new VirtualKeyboardObserver); | 140 env_state->virtual_keyboard_observer.reset(new VirtualKeyboardObserver); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 149 | 151 |
| 150 void ShutdownAthena() { | 152 void ShutdownAthena() { |
| 151 athena::ActivityFactory::Shutdown(); | 153 athena::ActivityFactory::Shutdown(); |
| 152 athena::ActivityManager::Shutdown(); | 154 athena::ActivityManager::Shutdown(); |
| 153 athena::HomeCard::Shutdown(); | 155 athena::HomeCard::Shutdown(); |
| 154 athena::AppRegistry::ShutDown(); | 156 athena::AppRegistry::ShutDown(); |
| 155 athena::WindowManager::Shutdown(); | 157 athena::WindowManager::Shutdown(); |
| 156 athena::ScreenManager::Shutdown(); | 158 athena::ScreenManager::Shutdown(); |
| 157 athena::InputManager::Shutdown(); | 159 athena::InputManager::Shutdown(); |
| 158 athena::SystemUI::Shutdown(); | 160 athena::SystemUI::Shutdown(); |
| 161 athena::ExtensionsDelegate::Shutdown(); |
| 159 | 162 |
| 160 delete views::ViewsDelegate::views_delegate; | 163 delete views::ViewsDelegate::views_delegate; |
| 161 } | 164 } |
| 162 | 165 |
| 163 } // namespace athena | 166 } // namespace athena |
| OLD | NEW |