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

Side by Side Diff: ash/common/wm_shell.cc

Issue 2486543003: Add CSS agent for various window/widget/view attributes in devtools (Closed)
Patch Set: rebase Created 4 years, 1 month 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
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Install the custom factory early on so that views::FocusManagers for Tray, 85 // Install the custom factory early on so that views::FocusManagers for Tray,
85 // Shelf, and WallPaper could be created by the factory. 86 // Shelf, and WallPaper could be created by the factory.
86 views::FocusManagerFactory::Install(new AshFocusManagerFactory); 87 views::FocusManagerFactory::Install(new AshFocusManagerFactory);
87 88
88 wallpaper_controller_.reset(new WallpaperController(blocking_pool_)); 89 wallpaper_controller_.reset(new WallpaperController(blocking_pool_));
89 90
90 // Start devtools server 91 // Start devtools server
91 devtools_server_ = ui::devtools::UiDevToolsServer::Create(nullptr); 92 devtools_server_ = ui::devtools::UiDevToolsServer::Create(nullptr);
92 if (devtools_server_) { 93 if (devtools_server_) {
93 auto dom_backend = base::MakeUnique<devtools::AshDevToolsDOMAgent>(this); 94 auto dom_backend = base::MakeUnique<devtools::AshDevToolsDOMAgent>(this);
95 auto css_backend =
96 base::MakeUnique<devtools::AshDevToolsCSSAgent>(dom_backend.get());
94 auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>( 97 auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>(
95 "Ash", devtools_server_.get()); 98 "Ash", devtools_server_.get());
96 devtools_client->AddAgent(std::move(dom_backend)); 99 devtools_client->AddAgent(std::move(dom_backend));
100 devtools_client->AddAgent(std::move(css_backend));
97 devtools_server_->AttachClient(std::move(devtools_client)); 101 devtools_server_->AttachClient(std::move(devtools_client));
98 } 102 }
99 } 103 }
100 104
101 void WmShell::Shutdown() { 105 void WmShell::Shutdown() {
102 // These members access WmShell in their destructors. 106 // These members access WmShell in their destructors.
103 wallpaper_controller_.reset(); 107 wallpaper_controller_.reset();
104 accessibility_delegate_.reset(); 108 accessibility_delegate_.reset();
105 109
106 // ShelfWindowWatcher has window observers and a pointer to the shelf model. 110 // ShelfWindowWatcher has window observers and a pointer to the shelf model.
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 void WmShell::DeleteToastManager() { 398 void WmShell::DeleteToastManager() {
395 toast_manager_.reset(); 399 toast_manager_.reset();
396 } 400 }
397 401
398 void WmShell::SetAcceleratorController( 402 void WmShell::SetAcceleratorController(
399 std::unique_ptr<AcceleratorController> accelerator_controller) { 403 std::unique_ptr<AcceleratorController> accelerator_controller) {
400 accelerator_controller_ = std::move(accelerator_controller); 404 accelerator_controller_ = std::move(accelerator_controller);
401 } 405 }
402 406
403 } // namespace ash 407 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698