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