| 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/aura/shell_port_classic.h" | 19 #include "ash/aura/shell_port_classic.h" |
| 20 #include "ash/autoclick/autoclick_controller.h" | 20 #include "ash/autoclick/autoclick_controller.h" |
| 21 #include "ash/cast_config_controller.h" | 21 #include "ash/cast_config_controller.h" |
| 22 #include "ash/devtools/ash_devtools_css_agent.h" | |
| 23 #include "ash/devtools/ash_devtools_dom_agent.h" | |
| 24 #include "ash/display/cursor_window_controller.h" | 22 #include "ash/display/cursor_window_controller.h" |
| 25 #include "ash/display/display_color_manager_chromeos.h" | 23 #include "ash/display/display_color_manager_chromeos.h" |
| 26 #include "ash/display/display_configuration_controller.h" | 24 #include "ash/display/display_configuration_controller.h" |
| 27 #include "ash/display/display_error_observer_chromeos.h" | 25 #include "ash/display/display_error_observer_chromeos.h" |
| 28 #include "ash/display/event_transformation_handler.h" | 26 #include "ash/display/event_transformation_handler.h" |
| 29 #include "ash/display/mouse_cursor_event_filter.h" | 27 #include "ash/display/mouse_cursor_event_filter.h" |
| 30 #include "ash/display/projecting_observer_chromeos.h" | 28 #include "ash/display/projecting_observer_chromeos.h" |
| 31 #include "ash/display/resolution_notification_controller.h" | 29 #include "ash/display/resolution_notification_controller.h" |
| 32 #include "ash/display/screen_ash.h" | 30 #include "ash/display/screen_ash.h" |
| 33 #include "ash/display/screen_orientation_controller_chromeos.h" | 31 #include "ash/display/screen_orientation_controller_chromeos.h" |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 #include "base/memory/ptr_util.h" | 121 #include "base/memory/ptr_util.h" |
| 124 #include "base/sys_info.h" | 122 #include "base/sys_info.h" |
| 125 #include "base/threading/sequenced_worker_pool.h" | 123 #include "base/threading/sequenced_worker_pool.h" |
| 126 #include "base/trace_event/trace_event.h" | 124 #include "base/trace_event/trace_event.h" |
| 127 #include "chromeos/audio/audio_a11y_controller.h" | 125 #include "chromeos/audio/audio_a11y_controller.h" |
| 128 #include "chromeos/chromeos_switches.h" | 126 #include "chromeos/chromeos_switches.h" |
| 129 #include "chromeos/dbus/dbus_thread_manager.h" | 127 #include "chromeos/dbus/dbus_thread_manager.h" |
| 130 #include "chromeos/system/devicemode.h" | 128 #include "chromeos/system/devicemode.h" |
| 131 #include "components/prefs/pref_registry_simple.h" | 129 #include "components/prefs/pref_registry_simple.h" |
| 132 #include "components/prefs/pref_service.h" | 130 #include "components/prefs/pref_service.h" |
| 131 #include "components/ui_devtools/devtools/ui_devtools_css_agent.h" |
| 132 #include "components/ui_devtools/devtools/ui_devtools_dom_agent.h" |
| 133 #include "components/ui_devtools/devtools_server.h" | 133 #include "components/ui_devtools/devtools_server.h" |
| 134 #include "services/preferences/public/cpp/pref_service_factory.h" | 134 #include "services/preferences/public/cpp/pref_service_factory.h" |
| 135 #include "services/preferences/public/interfaces/preferences.mojom.h" | 135 #include "services/preferences/public/interfaces/preferences.mojom.h" |
| 136 #include "services/service_manager/public/cpp/connector.h" | 136 #include "services/service_manager/public/cpp/connector.h" |
| 137 #include "services/ui/public/interfaces/constants.mojom.h" | 137 #include "services/ui/public/interfaces/constants.mojom.h" |
| 138 #include "ui/app_list/presenter/app_list.h" | 138 #include "ui/app_list/presenter/app_list.h" |
| 139 #include "ui/aura/client/aura_constants.h" | 139 #include "ui/aura/client/aura_constants.h" |
| 140 #include "ui/aura/env.h" | 140 #include "ui/aura/env.h" |
| 141 #include "ui/aura/layout_manager.h" | 141 #include "ui/aura/layout_manager.h" |
| 142 #include "ui/aura/mus/user_activity_forwarder.h" | 142 #include "ui/aura/mus/user_activity_forwarder.h" |
| (...skipping 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 | 796 |
| 797 // Install the custom factory early on so that views::FocusManagers for Tray, | 797 // Install the custom factory early on so that views::FocusManagers for Tray, |
| 798 // Shelf, and WallPaper could be created by the factory. | 798 // Shelf, and WallPaper could be created by the factory. |
| 799 views::FocusManagerFactory::Install(new AshFocusManagerFactory); | 799 views::FocusManagerFactory::Install(new AshFocusManagerFactory); |
| 800 | 800 |
| 801 wallpaper_controller_ = base::MakeUnique<WallpaperController>(blocking_pool_); | 801 wallpaper_controller_ = base::MakeUnique<WallpaperController>(blocking_pool_); |
| 802 | 802 |
| 803 // Start devtools server | 803 // Start devtools server |
| 804 devtools_server_ = ui::devtools::UiDevToolsServer::Create(nullptr); | 804 devtools_server_ = ui::devtools::UiDevToolsServer::Create(nullptr); |
| 805 if (devtools_server_) { | 805 if (devtools_server_) { |
| 806 auto dom_backend = base::MakeUnique<devtools::AshDevToolsDOMAgent>(); | 806 auto dom_backend = base::MakeUnique<ui::devtools::UIDevToolsDOMAgent>(); |
| 807 auto css_backend = | 807 auto css_backend = |
| 808 base::MakeUnique<devtools::AshDevToolsCSSAgent>(dom_backend.get()); | 808 base::MakeUnique<ui::devtools::UIDevToolsCSSAgent>(dom_backend.get()); |
| 809 auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>( | 809 auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>( |
| 810 "Ash", devtools_server_.get()); | 810 "Ash", devtools_server_.get()); |
| 811 devtools_client->AddAgent(std::move(dom_backend)); | 811 devtools_client->AddAgent(std::move(dom_backend)); |
| 812 devtools_client->AddAgent(std::move(css_backend)); | 812 devtools_client->AddAgent(std::move(css_backend)); |
| 813 devtools_server_->AttachClient(std::move(devtools_client)); | 813 devtools_server_->AttachClient(std::move(devtools_client)); |
| 814 } | 814 } |
| 815 | 815 |
| 816 if (config == Config::MASH) | 816 if (config == Config::MASH) |
| 817 app_list_delegate_impl_ = base::MakeUnique<AppListDelegateImpl>(); | 817 app_list_delegate_impl_ = base::MakeUnique<AppListDelegateImpl>(); |
| 818 | 818 |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1232 void Shell::OnPrefServiceInitialized( | 1232 void Shell::OnPrefServiceInitialized( |
| 1233 std::unique_ptr<::PrefService> pref_service) { | 1233 std::unique_ptr<::PrefService> pref_service) { |
| 1234 if (!instance_) | 1234 if (!instance_) |
| 1235 return; | 1235 return; |
| 1236 // |pref_service_| is null if can't connect to Chrome (as happens when | 1236 // |pref_service_| is null if can't connect to Chrome (as happens when |
| 1237 // running mash outside of chrome --mash and chrome isn't built). | 1237 // running mash outside of chrome --mash and chrome isn't built). |
| 1238 pref_service_ = std::move(pref_service); | 1238 pref_service_ = std::move(pref_service); |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 } // namespace ash | 1241 } // namespace ash |
| OLD | NEW |