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

Unified Diff: ash/common/wm_shell.cc

Issue 2372843002: Add ash devtools client (Closed)
Patch Set: Use MakeUnique Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/wm_shell.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm_shell.cc
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc
index c2e7cf2f8e848d123d5108191b0b8a0c13b3ad1f..da3bb1d99889a48445bfe23ebbe7ec003e9ff701 100644
--- a/ash/common/wm_shell.cc
+++ b/ash/common/wm_shell.cc
@@ -9,6 +9,7 @@
#include "ash/common/accelerators/accelerator_controller.h"
#include "ash/common/accelerators/ash_focus_manager_factory.h"
#include "ash/common/accessibility_delegate.h"
+#include "ash/common/devtools/devtools_dom_agent.h"
#include "ash/common/focus_cycler.h"
#include "ash/common/keyboard/keyboard_ui.h"
#include "ash/common/new_window_client_proxy.h"
@@ -85,6 +86,16 @@ void WmShell::Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool) {
views::FocusManagerFactory::Install(new AshFocusManagerFactory);
wallpaper_controller_.reset(new WallpaperController(blocking_pool_));
+
+ // Start devtools server
+ devtools_server_ = ui::devtools::UiDevToolsServer::Create();
+ if (devtools_server_) {
+ auto dom_backend = base::MakeUnique<devtools::AshDevToolsDOMAgent>(this);
+ auto devtools_client = base::MakeUnique<ui::devtools::UiDevToolsClient>(
+ "Ash", devtools_server_.get());
+ devtools_client->AddDOMBackend(std::move(dom_backend));
+ devtools_server_->AttachClient(std::move(devtools_client));
+ }
}
void WmShell::Shutdown() {
« no previous file with comments | « ash/common/wm_shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698