| 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/public/athena_launcher.h" | 5 #include "athena/main/public/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_creator.h" | 10 #include "athena/content/public/content_activity_factory_creator.h" |
| 11 #include "athena/env/public/athena_env.h" | 11 #include "athena/env/public/athena_env.h" |
| 12 #include "athena/extensions/public/extension_app_model_builder.h" | 12 #include "athena/extensions/public/extension_app_model_builder.h" |
| 13 #include "athena/extensions/public/extensions_delegate.h" | 13 #include "athena/extensions/public/extensions_delegate.h" |
| 14 #include "athena/home/public/home_card.h" | 14 #include "athena/home/public/home_card.h" |
| 15 #include "athena/input/public/input_manager.h" | 15 #include "athena/input/public/input_manager.h" |
| 16 #include "athena/main/athena_views_delegate.h" | 16 #include "athena/main/athena_views_delegate.h" |
| 17 #include "athena/main/placeholder.h" | 17 #include "athena/main/placeholder.h" |
| 18 #include "athena/main/placeholder.h" | 18 #include "athena/main/placeholder.h" |
| 19 #include "athena/main/url_search_provider.h" | 19 #include "athena/main/url_search_provider.h" |
| 20 #include "athena/resource_manager/public/resource_manager.h" | 20 #include "athena/resource_manager/public/resource_manager.h" |
| 21 #include "athena/screen/public/screen_manager.h" | 21 #include "athena/screen/public/screen_manager.h" |
| 22 #include "athena/system/public/system_ui.h" | 22 #include "athena/system/public/system_ui.h" |
| 23 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h" | 23 #include "athena/virtual_keyboard/public/virtual_keyboard_manager.h" |
| 24 #include "athena/wm/public/window_manager.h" | 24 #include "athena/wm/public/window_manager.h" |
| 25 #include "base/command_line.h" | 25 #include "base/command_line.h" |
| 26 #include "base/memory/scoped_ptr.h" | 26 #include "base/memory/scoped_ptr.h" |
| 27 #include "content/public/common/content_switches.h" |
| 27 #include "ui/app_list/app_list_switches.h" | 28 #include "ui/app_list/app_list_switches.h" |
| 28 #include "ui/aura/window_property.h" | 29 #include "ui/aura/window_property.h" |
| 29 #include "ui/aura/window_tree_host.h" | 30 #include "ui/aura/window_tree_host.h" |
| 30 #include "ui/keyboard/keyboard_controller.h" | 31 #include "ui/keyboard/keyboard_controller.h" |
| 31 #include "ui/keyboard/keyboard_controller_observer.h" | 32 #include "ui/keyboard/keyboard_controller_observer.h" |
| 32 #include "ui/native_theme/native_theme_switches.h" | 33 #include "ui/native_theme/native_theme_switches.h" |
| 33 #include "ui/wm/core/visibility_controller.h" | 34 #include "ui/wm/core/visibility_controller.h" |
| 34 | 35 |
| 35 #if defined(USE_X11) | 36 #if defined(USE_X11) |
| 36 #include "ui/events/x/touch_factory_x11.h" | 37 #include "ui/events/x/touch_factory_x11.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 86 |
| 86 void StartAthenaEnv(scoped_refptr<base::TaskRunner> blocking_task_runner) { | 87 void StartAthenaEnv(scoped_refptr<base::TaskRunner> blocking_task_runner) { |
| 87 athena::AthenaEnv::Create(); | 88 athena::AthenaEnv::Create(); |
| 88 | 89 |
| 89 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 90 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 90 | 91 |
| 91 // Force showing in the experimental app-list view. | 92 // Force showing in the experimental app-list view. |
| 92 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); | 93 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); |
| 93 command_line->AppendSwitch(switches::kEnableOverlayScrollbar); | 94 command_line->AppendSwitch(switches::kEnableOverlayScrollbar); |
| 94 | 95 |
| 96 // Enable vertical overscroll. |
| 97 command_line->AppendSwitchASCII(switches::kScrollEndEffect, "1"); |
| 98 |
| 95 #if defined(USE_X11) | 99 #if defined(USE_X11) |
| 96 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); | 100 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); |
| 97 #endif | 101 #endif |
| 98 | 102 |
| 99 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate(); | 103 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate(); |
| 100 | 104 |
| 101 AthenaEnvState* env_state = new AthenaEnvState; | 105 AthenaEnvState* env_state = new AthenaEnvState; |
| 102 | 106 |
| 103 // Setup VisibilityClient | 107 // Setup VisibilityClient |
| 104 env_state->visibility_client.reset(new ::wm::VisibilityController); | 108 env_state->visibility_client.reset(new ::wm::VisibilityController); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 athena::SystemUI::Shutdown(); | 162 athena::SystemUI::Shutdown(); |
| 159 athena::ScreenManager::Shutdown(); | 163 athena::ScreenManager::Shutdown(); |
| 160 athena::InputManager::Shutdown(); | 164 athena::InputManager::Shutdown(); |
| 161 athena::ExtensionsDelegate::Shutdown(); | 165 athena::ExtensionsDelegate::Shutdown(); |
| 162 athena::AthenaEnv::Shutdown(); | 166 athena::AthenaEnv::Shutdown(); |
| 163 | 167 |
| 164 delete views::ViewsDelegate::views_delegate; | 168 delete views::ViewsDelegate::views_delegate; |
| 165 } | 169 } |
| 166 | 170 |
| 167 } // namespace athena | 171 } // namespace athena |
| OLD | NEW |