| 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/home/public/home_card.h" | 9 #include "athena/home/public/home_card.h" |
| 10 #include "athena/main/placeholder.h" | 10 #include "athena/main/placeholder.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // Athena's per root window state. | 29 // Athena's per root window state. |
| 30 struct RootWindowState { | 30 struct RootWindowState { |
| 31 scoped_ptr< ::wm::VisibilityController> visibility_client; | 31 scoped_ptr< ::wm::VisibilityController> visibility_client; |
| 32 }; | 32 }; |
| 33 | 33 |
| 34 DEFINE_OWNED_WINDOW_PROPERTY_KEY(athena::RootWindowState, | 34 DEFINE_OWNED_WINDOW_PROPERTY_KEY(athena::RootWindowState, |
| 35 kRootWindowStateKey, | 35 kRootWindowStateKey, |
| 36 NULL); | 36 NULL); |
| 37 | 37 |
| 38 void StartAthena(aura::Window* root_window, | 38 void StartAthena(aura::Window* root_window, |
| 39 athena::ActivityFactory* activity_factory) { | 39 athena::ActivityFactory* activity_factory, |
| 40 athena::AppModelBuilder* app_model_builder) { |
| 40 #if defined(USE_X11) | 41 #if defined(USE_X11) |
| 41 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); | 42 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); |
| 42 #endif | 43 #endif |
| 43 RootWindowState* root_window_state = new RootWindowState; | 44 RootWindowState* root_window_state = new RootWindowState; |
| 44 root_window->SetProperty(kRootWindowStateKey, root_window_state); | 45 root_window->SetProperty(kRootWindowStateKey, root_window_state); |
| 45 | 46 |
| 46 root_window_state->visibility_client.reset(new ::wm::VisibilityController); | 47 root_window_state->visibility_client.reset(new ::wm::VisibilityController); |
| 47 aura::client::SetVisibilityClient(root_window, | 48 aura::client::SetVisibilityClient(root_window, |
| 48 root_window_state->visibility_client.get()); | 49 root_window_state->visibility_client.get()); |
| 49 | 50 |
| 50 athena::ScreenManager::Create(root_window); | 51 athena::ScreenManager::Create(root_window); |
| 51 athena::WindowManager::Create(); | 52 athena::WindowManager::Create(); |
| 52 athena::HomeCard::Create(); | 53 athena::HomeCard::Create(app_model_builder); |
| 53 athena::ActivityManager::Create(); | 54 athena::ActivityManager::Create(); |
| 54 athena::ActivityFactory::RegisterActivityFactory(activity_factory); | 55 athena::ActivityFactory::RegisterActivityFactory(activity_factory); |
| 55 SetupBackgroundImage(); | 56 SetupBackgroundImage(); |
| 56 } | 57 } |
| 57 | 58 |
| 58 void ShutdownAthena() { | 59 void ShutdownAthena() { |
| 59 athena::ActivityFactory::Shutdown(); | 60 athena::ActivityFactory::Shutdown(); |
| 60 athena::ActivityManager::Shutdown(); | 61 athena::ActivityManager::Shutdown(); |
| 61 athena::HomeCard::Shutdown(); | 62 athena::HomeCard::Shutdown(); |
| 62 athena::WindowManager::Shutdown(); | 63 athena::WindowManager::Shutdown(); |
| 63 athena::ScreenManager::Shutdown(); | 64 athena::ScreenManager::Shutdown(); |
| 64 } | 65 } |
| 65 | 66 |
| 66 } // namespace athena | 67 } // namespace athena |
| OLD | NEW |