OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ash/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "ash/accelerators/accelerator_controller.h" | 11 #include "ash/accelerators/accelerator_controller.h" |
12 #include "ash/accelerators/accelerator_delegate.h" | 12 #include "ash/accelerators/accelerator_delegate.h" |
13 #include "ash/accelerators/ash_focus_manager_factory.h" | 13 #include "ash/accelerators/ash_focus_manager_factory.h" |
14 #include "ash/accelerators/magnifier_key_scroller.h" | 14 #include "ash/accelerators/magnifier_key_scroller.h" |
15 #include "ash/accelerators/spoken_feedback_toggler.h" | 15 #include "ash/accelerators/spoken_feedback_toggler.h" |
16 #include "ash/accessibility_delegate.h" | 16 #include "ash/accessibility_delegate.h" |
17 #include "ash/app_list/app_list_delegate_impl.h" | 17 #include "ash/app_list/app_list_delegate_impl.h" |
18 #include "ash/ash_constants.h" | 18 #include "ash/ash_constants.h" |
19 #include "ash/ash_switches.h" | 19 #include "ash/ash_switches.h" |
20 #include "ash/aura/shell_port_classic.h" | 20 #include "ash/aura/shell_port_classic.h" |
21 #include "ash/autoclick/autoclick_controller.h" | 21 #include "ash/autoclick/autoclick_controller.h" |
22 #include "ash/cast_config_controller.h" | 22 #include "ash/cast_config_controller.h" |
23 #include "ash/devtools/ash_devtools_css_agent.h" | |
24 #include "ash/devtools/ash_devtools_dom_agent.h" | |
25 #include "ash/display/ash_display_controller.h" | 23 #include "ash/display/ash_display_controller.h" |
26 #include "ash/display/cursor_window_controller.h" | 24 #include "ash/display/cursor_window_controller.h" |
27 #include "ash/display/display_color_manager_chromeos.h" | 25 #include "ash/display/display_color_manager_chromeos.h" |
28 #include "ash/display/display_configuration_controller.h" | 26 #include "ash/display/display_configuration_controller.h" |
29 #include "ash/display/display_error_observer_chromeos.h" | 27 #include "ash/display/display_error_observer_chromeos.h" |
30 #include "ash/display/event_transformation_handler.h" | 28 #include "ash/display/event_transformation_handler.h" |
31 #include "ash/display/mouse_cursor_event_filter.h" | 29 #include "ash/display/mouse_cursor_event_filter.h" |
32 #include "ash/display/projecting_observer_chromeos.h" | 30 #include "ash/display/projecting_observer_chromeos.h" |
33 #include "ash/display/resolution_notification_controller.h" | 31 #include "ash/display/resolution_notification_controller.h" |
34 #include "ash/display/screen_ash.h" | 32 #include "ash/display/screen_ash.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 #include "base/memory/ptr_util.h" | 122 #include "base/memory/ptr_util.h" |
125 #include "base/sys_info.h" | 123 #include "base/sys_info.h" |
126 #include "base/threading/sequenced_worker_pool.h" | 124 #include "base/threading/sequenced_worker_pool.h" |
127 #include "base/trace_event/trace_event.h" | 125 #include "base/trace_event/trace_event.h" |
128 #include "chromeos/audio/audio_a11y_controller.h" | 126 #include "chromeos/audio/audio_a11y_controller.h" |
129 #include "chromeos/chromeos_switches.h" | 127 #include "chromeos/chromeos_switches.h" |
130 #include "chromeos/dbus/dbus_thread_manager.h" | 128 #include "chromeos/dbus/dbus_thread_manager.h" |
131 #include "chromeos/system/devicemode.h" | 129 #include "chromeos/system/devicemode.h" |
132 #include "components/prefs/pref_registry_simple.h" | 130 #include "components/prefs/pref_registry_simple.h" |
133 #include "components/prefs/pref_service.h" | 131 #include "components/prefs/pref_service.h" |
| 132 #include "components/ui_devtools/devtools/ui_devtools_css_agent.h" |
| 133 #include "components/ui_devtools/devtools/ui_devtools_dom_agent.h" |
134 #include "components/ui_devtools/devtools_server.h" | 134 #include "components/ui_devtools/devtools_server.h" |
135 #include "services/preferences/public/cpp/pref_service_factory.h" | 135 #include "services/preferences/public/cpp/pref_service_factory.h" |
136 #include "services/preferences/public/interfaces/preferences.mojom.h" | 136 #include "services/preferences/public/interfaces/preferences.mojom.h" |
137 #include "services/service_manager/public/cpp/connector.h" | 137 #include "services/service_manager/public/cpp/connector.h" |
138 #include "services/ui/public/interfaces/constants.mojom.h" | 138 #include "services/ui/public/interfaces/constants.mojom.h" |
139 #include "ui/app_list/presenter/app_list.h" | 139 #include "ui/app_list/presenter/app_list.h" |
140 #include "ui/aura/client/aura_constants.h" | 140 #include "ui/aura/client/aura_constants.h" |
141 #include "ui/aura/env.h" | 141 #include "ui/aura/env.h" |
142 #include "ui/aura/layout_manager.h" | 142 #include "ui/aura/layout_manager.h" |
143 #include "ui/aura/mus/focus_synchronizer.h" | 143 #include "ui/aura/mus/focus_synchronizer.h" |
(...skipping 670 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 | 814 |
815 // Install the custom factory early on so that views::FocusManagers for Tray, | 815 // Install the custom factory early on so that views::FocusManagers for Tray, |
816 // Shelf, and WallPaper could be created by the factory. | 816 // Shelf, and WallPaper could be created by the factory. |
817 views::FocusManagerFactory::Install(new AshFocusManagerFactory); | 817 views::FocusManagerFactory::Install(new AshFocusManagerFactory); |
818 | 818 |
819 wallpaper_controller_ = base::MakeUnique<WallpaperController>(blocking_pool_); | 819 wallpaper_controller_ = base::MakeUnique<WallpaperController>(blocking_pool_); |
820 | 820 |
821 // Start devtools server | 821 // Start devtools server |
822 devtools_server_ = ui::devtools::UiDevToolsServer::Create(nullptr); | 822 devtools_server_ = ui::devtools::UiDevToolsServer::Create(nullptr); |
823 if (devtools_server_) { | 823 if (devtools_server_) { |
824 auto dom_backend = base::MakeUnique<devtools::AshDevToolsDOMAgent>(); | 824 auto dom_backend = base::MakeUnique<ui::devtools::UIDevToolsDOMAgent>(); |
825 auto css_backend = | 825 auto css_backend = |
826 base::MakeUnique<devtools::AshDevToolsCSSAgent>(dom_backend.get()); | 826 base::MakeUnique<ui::devtools::UIDevToolsCSSAgent>(dom_backend.get()); |
827 auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>( | 827 auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>( |
828 "Ash", devtools_server_.get()); | 828 "Ash", devtools_server_.get()); |
829 devtools_client->AddAgent(std::move(dom_backend)); | 829 devtools_client->AddAgent(std::move(dom_backend)); |
830 devtools_client->AddAgent(std::move(css_backend)); | 830 devtools_client->AddAgent(std::move(css_backend)); |
831 devtools_server_->AttachClient(std::move(devtools_client)); | 831 devtools_server_->AttachClient(std::move(devtools_client)); |
832 } | 832 } |
833 | 833 |
834 if (config == Config::MASH) | 834 if (config == Config::MASH) |
835 app_list_delegate_impl_ = base::MakeUnique<AppListDelegateImpl>(); | 835 app_list_delegate_impl_ = base::MakeUnique<AppListDelegateImpl>(); |
836 | 836 |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 void Shell::OnPrefServiceInitialized( | 1261 void Shell::OnPrefServiceInitialized( |
1262 std::unique_ptr<::PrefService> pref_service) { | 1262 std::unique_ptr<::PrefService> pref_service) { |
1263 if (!instance_) | 1263 if (!instance_) |
1264 return; | 1264 return; |
1265 // |pref_service_| is null if can't connect to Chrome (as happens when | 1265 // |pref_service_| is null if can't connect to Chrome (as happens when |
1266 // running mash outside of chrome --mash and chrome isn't built). | 1266 // running mash outside of chrome --mash and chrome isn't built). |
1267 pref_service_ = std::move(pref_service); | 1267 pref_service_ = std::move(pref_service); |
1268 } | 1268 } |
1269 | 1269 |
1270 } // namespace ash | 1270 } // namespace ash |
OLD | NEW |