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 17 matching lines...) Expand all Loading... |
28 | 28 |
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 #if defined(USE_X11) | 40 #if defined(USE_X11) |
40 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); | 41 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); |
41 #endif | 42 #endif |
42 RootWindowState* root_window_state = new RootWindowState; | 43 RootWindowState* root_window_state = new RootWindowState; |
43 root_window->SetProperty(kRootWindowStateKey, root_window_state); | 44 root_window->SetProperty(kRootWindowStateKey, root_window_state); |
44 | 45 |
45 root_window_state->visibility_client.reset(new ::wm::VisibilityController); | 46 root_window_state->visibility_client.reset(new ::wm::VisibilityController); |
46 aura::client::SetVisibilityClient(root_window, | 47 aura::client::SetVisibilityClient(root_window, |
47 root_window_state->visibility_client.get()); | 48 root_window_state->visibility_client.get()); |
48 | 49 |
49 athena::ScreenManager::Create(root_window); | 50 athena::ScreenManager::Create(root_window); |
50 athena::WindowManager::Create(); | 51 athena::WindowManager::Create(); |
51 athena::HomeCard::Create(); | 52 athena::HomeCard::Create(); |
52 athena::ActivityManager::Create(); | 53 athena::ActivityManager::Create(); |
| 54 athena::ActivityFactory::RegisterActivityFactory(activity_factory); |
53 SetupBackgroundImage(); | 55 SetupBackgroundImage(); |
54 } | 56 } |
55 | 57 |
56 void ShutdownAthena() { | 58 void ShutdownAthena() { |
| 59 athena::ActivityFactory::Shutdown(); |
57 athena::ActivityManager::Shutdown(); | 60 athena::ActivityManager::Shutdown(); |
58 athena::HomeCard::Shutdown(); | 61 athena::HomeCard::Shutdown(); |
59 athena::WindowManager::Shutdown(); | 62 athena::WindowManager::Shutdown(); |
60 athena::ScreenManager::Shutdown(); | 63 athena::ScreenManager::Shutdown(); |
61 } | 64 } |
62 | 65 |
63 } // namespace athena | 66 } // namespace athena |
OLD | NEW |