Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Side by Side Diff: ash/shell.cc

Issue 2899783002: Move DevTools out of ash and turn it to a component. (Closed)
Patch Set: add README.md Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/shell.h ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #include "base/sys_info.h" 124 #include "base/sys_info.h"
127 #include "base/threading/sequenced_worker_pool.h" 125 #include "base/threading/sequenced_worker_pool.h"
128 #include "base/trace_event/trace_event.h" 126 #include "base/trace_event/trace_event.h"
129 #include "chromeos/audio/audio_a11y_controller.h" 127 #include "chromeos/audio/audio_a11y_controller.h"
130 #include "chromeos/chromeos_switches.h" 128 #include "chromeos/chromeos_switches.h"
131 #include "chromeos/dbus/dbus_thread_manager.h" 129 #include "chromeos/dbus/dbus_thread_manager.h"
132 #include "chromeos/system/devicemode.h" 130 #include "chromeos/system/devicemode.h"
133 #include "components/prefs/pref_registry_simple.h" 131 #include "components/prefs/pref_registry_simple.h"
134 #include "components/prefs/pref_service.h" 132 #include "components/prefs/pref_service.h"
135 #include "components/ui_devtools/devtools_server.h" 133 #include "components/ui_devtools/devtools_server.h"
134 #include "components/ui_devtools/views/ui_devtools_css_agent.h"
135 #include "components/ui_devtools/views/ui_devtools_dom_agent.h"
136 #include "services/preferences/public/cpp/pref_service_factory.h" 136 #include "services/preferences/public/cpp/pref_service_factory.h"
137 #include "services/preferences/public/interfaces/preferences.mojom.h" 137 #include "services/preferences/public/interfaces/preferences.mojom.h"
138 #include "services/service_manager/public/cpp/connector.h" 138 #include "services/service_manager/public/cpp/connector.h"
139 #include "services/ui/public/interfaces/constants.mojom.h" 139 #include "services/ui/public/interfaces/constants.mojom.h"
140 #include "ui/app_list/presenter/app_list.h" 140 #include "ui/app_list/presenter/app_list.h"
141 #include "ui/aura/client/aura_constants.h" 141 #include "ui/aura/client/aura_constants.h"
142 #include "ui/aura/env.h" 142 #include "ui/aura/env.h"
143 #include "ui/aura/layout_manager.h" 143 #include "ui/aura/layout_manager.h"
144 #include "ui/aura/mus/focus_synchronizer.h" 144 #include "ui/aura/mus/focus_synchronizer.h"
145 #include "ui/aura/mus/user_activity_forwarder.h" 145 #include "ui/aura/mus/user_activity_forwarder.h"
(...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 palette_delegate_ = shell_delegate_->CreatePaletteDelegate(); 831 palette_delegate_ = shell_delegate_->CreatePaletteDelegate();
832 toast_manager_ = base::MakeUnique<ToastManager>(); 832 toast_manager_ = base::MakeUnique<ToastManager>();
833 833
834 // Install the custom factory early on so that views::FocusManagers for Tray, 834 // Install the custom factory early on so that views::FocusManagers for Tray,
835 // Shelf, and WallPaper could be created by the factory. 835 // Shelf, and WallPaper could be created by the factory.
836 views::FocusManagerFactory::Install(new AshFocusManagerFactory); 836 views::FocusManagerFactory::Install(new AshFocusManagerFactory);
837 837
838 wallpaper_controller_ = base::MakeUnique<WallpaperController>(blocking_pool_); 838 wallpaper_controller_ = base::MakeUnique<WallpaperController>(blocking_pool_);
839 839
840 // Start devtools server 840 // Start devtools server
841 devtools_server_ = ui::devtools::UiDevToolsServer::Create(nullptr); 841 devtools_server_ = ui_devtools::UiDevToolsServer::Create(nullptr);
842 if (devtools_server_) { 842 if (devtools_server_) {
843 auto dom_backend = base::MakeUnique<devtools::AshDevToolsDOMAgent>(); 843 auto dom_backend = base::MakeUnique<ui_devtools::UIDevToolsDOMAgent>();
844 auto css_backend = 844 auto css_backend =
845 base::MakeUnique<devtools::AshDevToolsCSSAgent>(dom_backend.get()); 845 base::MakeUnique<ui_devtools::UIDevToolsCSSAgent>(dom_backend.get());
846 auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>( 846 auto devtools_client = base::MakeUnique<ui_devtools::UiDevToolsClient>(
847 "Ash", devtools_server_.get()); 847 "Ash", devtools_server_.get());
848 devtools_client->AddAgent(std::move(dom_backend)); 848 devtools_client->AddAgent(std::move(dom_backend));
849 devtools_client->AddAgent(std::move(css_backend)); 849 devtools_client->AddAgent(std::move(css_backend));
850 devtools_server_->AttachClient(std::move(devtools_client)); 850 devtools_server_->AttachClient(std::move(devtools_client));
851 } 851 }
852 852
853 if (config == Config::MASH) 853 if (config == Config::MASH)
854 app_list_delegate_impl_ = base::MakeUnique<AppListDelegateImpl>(); 854 app_list_delegate_impl_ = base::MakeUnique<AppListDelegateImpl>();
855 855
856 // TODO(sky): move creation to ShellPort. 856 // TODO(sky): move creation to ShellPort.
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
1280 void Shell::OnPrefServiceInitialized( 1280 void Shell::OnPrefServiceInitialized(
1281 std::unique_ptr<::PrefService> pref_service) { 1281 std::unique_ptr<::PrefService> pref_service) {
1282 if (!instance_) 1282 if (!instance_)
1283 return; 1283 return;
1284 // |pref_service_| is null if can't connect to Chrome (as happens when 1284 // |pref_service_| is null if can't connect to Chrome (as happens when
1285 // running mash outside of chrome --mash and chrome isn't built). 1285 // running mash outside of chrome --mash and chrome isn't built).
1286 pref_service_ = std::move(pref_service); 1286 pref_service_ = std::move(pref_service);
1287 } 1287 }
1288 1288
1289 } // namespace ash 1289 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shell.h ('k') | chrome/browser/about_flags.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698