| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/common/wm_shell.h" | 5 #include "ash/common/wm_shell.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/accelerators/accelerator_controller.h" | 9 #include "ash/common/accelerators/accelerator_controller.h" |
| 10 #include "ash/common/accelerators/ash_focus_manager_factory.h" | 10 #include "ash/common/accelerators/ash_focus_manager_factory.h" |
| 11 #include "ash/common/accessibility_delegate.h" | 11 #include "ash/common/accessibility_delegate.h" |
| 12 #include "ash/common/devtools/ash_devtools_css_agent.h" |
| 12 #include "ash/common/devtools/ash_devtools_dom_agent.h" | 13 #include "ash/common/devtools/ash_devtools_dom_agent.h" |
| 13 #include "ash/common/focus_cycler.h" | 14 #include "ash/common/focus_cycler.h" |
| 14 #include "ash/common/keyboard/keyboard_ui.h" | 15 #include "ash/common/keyboard/keyboard_ui.h" |
| 15 #include "ash/common/new_window_client_proxy.h" | 16 #include "ash/common/new_window_client_proxy.h" |
| 16 #include "ash/common/palette_delegate.h" | 17 #include "ash/common/palette_delegate.h" |
| 17 #include "ash/common/session/session_state_delegate.h" | 18 #include "ash/common/session/session_state_delegate.h" |
| 18 #include "ash/common/shelf/app_list_shelf_item_delegate.h" | 19 #include "ash/common/shelf/app_list_shelf_item_delegate.h" |
| 19 #include "ash/common/shelf/shelf_controller.h" | 20 #include "ash/common/shelf/shelf_controller.h" |
| 20 #include "ash/common/shelf/shelf_delegate.h" | 21 #include "ash/common/shelf/shelf_delegate.h" |
| 21 #include "ash/common/shelf/shelf_model.h" | 22 #include "ash/common/shelf/shelf_model.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Install the custom factory early on so that views::FocusManagers for Tray, | 86 // Install the custom factory early on so that views::FocusManagers for Tray, |
| 86 // Shelf, and WallPaper could be created by the factory. | 87 // Shelf, and WallPaper could be created by the factory. |
| 87 views::FocusManagerFactory::Install(new AshFocusManagerFactory); | 88 views::FocusManagerFactory::Install(new AshFocusManagerFactory); |
| 88 | 89 |
| 89 wallpaper_controller_.reset(new WallpaperController(blocking_pool_)); | 90 wallpaper_controller_.reset(new WallpaperController(blocking_pool_)); |
| 90 | 91 |
| 91 // Start devtools server | 92 // Start devtools server |
| 92 devtools_server_ = ui::devtools::UiDevToolsServer::Create(nullptr); | 93 devtools_server_ = ui::devtools::UiDevToolsServer::Create(nullptr); |
| 93 if (devtools_server_) { | 94 if (devtools_server_) { |
| 94 auto dom_backend = base::MakeUnique<devtools::AshDevToolsDOMAgent>(this); | 95 auto dom_backend = base::MakeUnique<devtools::AshDevToolsDOMAgent>(this); |
| 96 auto css_backend = |
| 97 base::MakeUnique<devtools::AshDevToolsCSSAgent>(dom_backend.get()); |
| 95 auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>( | 98 auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>( |
| 96 "Ash", devtools_server_.get()); | 99 "Ash", devtools_server_.get()); |
| 97 devtools_client->AddAgent(std::move(dom_backend)); | 100 devtools_client->AddAgent(std::move(dom_backend)); |
| 101 devtools_client->AddAgent(std::move(css_backend)); |
| 98 devtools_server_->AttachClient(std::move(devtools_client)); | 102 devtools_server_->AttachClient(std::move(devtools_client)); |
| 99 } | 103 } |
| 100 } | 104 } |
| 101 | 105 |
| 102 void WmShell::Shutdown() { | 106 void WmShell::Shutdown() { |
| 103 // These members access WmShell in their destructors. | 107 // These members access WmShell in their destructors. |
| 104 wallpaper_controller_.reset(); | 108 wallpaper_controller_.reset(); |
| 105 accessibility_delegate_.reset(); | 109 accessibility_delegate_.reset(); |
| 106 | 110 |
| 107 // ShelfWindowWatcher has window observers and a pointer to the shelf model. | 111 // ShelfWindowWatcher has window observers and a pointer to the shelf model. |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 void WmShell::DeleteToastManager() { | 400 void WmShell::DeleteToastManager() { |
| 397 toast_manager_.reset(); | 401 toast_manager_.reset(); |
| 398 } | 402 } |
| 399 | 403 |
| 400 void WmShell::SetAcceleratorController( | 404 void WmShell::SetAcceleratorController( |
| 401 std::unique_ptr<AcceleratorController> accelerator_controller) { | 405 std::unique_ptr<AcceleratorController> accelerator_controller) { |
| 402 accelerator_controller_ = std::move(accelerator_controller); | 406 accelerator_controller_ = std::move(accelerator_controller); |
| 403 } | 407 } |
| 404 | 408 |
| 405 } // namespace ash | 409 } // namespace ash |
| OLD | NEW |