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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 | 80 |
80 void StartAthenaEnv(scoped_refptr<base::TaskRunner> file_runner) { | 81 void StartAthenaEnv(scoped_refptr<base::TaskRunner> file_runner) { |
81 athena::AthenaEnv::Create(); | 82 athena::AthenaEnv::Create(); |
82 | 83 |
83 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 84 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
84 | 85 |
85 // Force showing in the experimental app-list view. | 86 // Force showing in the experimental app-list view. |
86 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); | 87 command_line->AppendSwitch(app_list::switches::kEnableExperimentalAppList); |
87 command_line->AppendSwitch(switches::kEnableOverlayScrollbar); | 88 command_line->AppendSwitch(switches::kEnableOverlayScrollbar); |
88 | 89 |
| 90 // Enable vertical overscroll. |
| 91 command_line->AppendSwitchASCII(switches::kScrollEndEffect, "1"); |
| 92 |
89 #if defined(USE_X11) | 93 #if defined(USE_X11) |
90 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); | 94 ui::TouchFactory::SetTouchDeviceListFromCommandLine(); |
91 #endif | 95 #endif |
92 | 96 |
93 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate(); | 97 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate(); |
94 | 98 |
95 AthenaEnvState* env_state = new AthenaEnvState; | 99 AthenaEnvState* env_state = new AthenaEnvState; |
96 | 100 |
97 // Setup VisibilityClient | 101 // Setup VisibilityClient |
98 env_state->visibility_client.reset(new ::wm::VisibilityController); | 102 env_state->visibility_client.reset(new ::wm::VisibilityController); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 athena::SystemUI::Shutdown(); | 151 athena::SystemUI::Shutdown(); |
148 athena::ScreenManager::Shutdown(); | 152 athena::ScreenManager::Shutdown(); |
149 athena::InputManager::Shutdown(); | 153 athena::InputManager::Shutdown(); |
150 athena::ExtensionsDelegate::Shutdown(); | 154 athena::ExtensionsDelegate::Shutdown(); |
151 athena::AthenaEnv::Shutdown(); | 155 athena::AthenaEnv::Shutdown(); |
152 | 156 |
153 delete views::ViewsDelegate::views_delegate; | 157 delete views::ViewsDelegate::views_delegate; |
154 } | 158 } |
155 | 159 |
156 } // namespace athena | 160 } // namespace athena |
OLD | NEW |