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

Unified Diff: ash/common/wm_shell.cc

Issue 2372843002: Add ash devtools client (Closed)
Patch Set: sadrul's feedback and renamed to dom_agent 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
« ash/BUILD.gn ('K') | « 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 d5c49e3bfa97db1d102250991fca9123ff40d62f..a088cdee81850c796bcd49f3609c2aba6a97defc 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_delegate.h"
@@ -87,6 +88,17 @@ void WmShell::Initialize(const scoped_refptr<base::SequencedWorkerPool>& pool) {
new_window_delegate_.reset(delegate_->CreateNewWindowDelegate());
wallpaper_controller_.reset(new WallpaperController(blocking_pool_));
+
+ // Start devtools server
+ devtools_server_ = ui::devtools::UiDevToolsServer::Create();
+ if (devtools_server_) {
+ std::unique_ptr<ui::devtools::protocol::DOM::Backend> backend(
sky 2016/10/28 21:27:10 MakeUnique where possible.
Sarmad Hashmi 2016/10/28 21:58:19 Done.
+ new devtools::AshDevToolsDOMAgent(this));
+ std::unique_ptr<ui::devtools::UiDevToolsClient> devtools_client(
+ new ui::devtools::UiDevToolsClient("Ash", devtools_server_.get()));
+ devtools_client->AddDOMBackend(std::move(backend));
+ devtools_server_->AttachClient(std::move(devtools_client));
+ }
}
void WmShell::Shutdown() {
« ash/BUILD.gn ('K') | « ash/common/wm_shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698