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

Side by Side Diff: ash/common/devtools/ash_devtools_dom_agent.cc

Issue 2468803002: [DevTools] migrate InspectorDOMAgent to new style (Closed)
Patch Set: addressed comments and rebased 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/devtools/ash_devtools_dom_agent.h" 5 #include "ash/common/devtools/ash_devtools_dom_agent.h"
6 6
7 #include "ash/common/wm_window.h" 7 #include "ash/common/wm_window.h"
8 #include "components/ui_devtools/devtools_server.h" 8 #include "components/ui_devtools/devtools_server.h"
9 #include "ui/views/view.h" 9 #include "ui/views/view.h"
10 #include "ui/views/widget/widget.h" 10 #include "ui/views/widget/widget.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 std::unique_ptr<ui::devtools::protocol::DOM::Node> 92 std::unique_ptr<ui::devtools::protocol::DOM::Node>
93 AshDevToolsDOMAgent::BuildInitialTree() { 93 AshDevToolsDOMAgent::BuildInitialTree() {
94 std::unique_ptr<Array<DOM::Node>> children = Array<DOM::Node>::create(); 94 std::unique_ptr<Array<DOM::Node>> children = Array<DOM::Node>::create();
95 for (ash::WmWindow* window : shell_->GetAllRootWindows()) { 95 for (ash::WmWindow* window : shell_->GetAllRootWindows()) {
96 children->addItem(BuildTreeForWindow(window)); 96 children->addItem(BuildTreeForWindow(window));
97 } 97 }
98 return BuildNode("root", nullptr, std::move(children)); 98 return BuildNode("root", nullptr, std::move(children));
99 } 99 }
100 100
101 void AshDevToolsDOMAgent::getDocument( 101 ui::devtools::protocol::Response AshDevToolsDOMAgent::enable() {
102 ui::devtools::protocol::ErrorString* error, 102 return ui::devtools::protocol::Response::OK();
103 }
104
105 ui::devtools::protocol::Response AshDevToolsDOMAgent::disable() {
106 return ui::devtools::protocol::Response::OK();
107 }
108
109 ui::devtools::protocol::Response AshDevToolsDOMAgent::getDocument(
103 std::unique_ptr<ui::devtools::protocol::DOM::Node>* out_root) { 110 std::unique_ptr<ui::devtools::protocol::DOM::Node>* out_root) {
104 *out_root = BuildInitialTree(); 111 *out_root = BuildInitialTree();
112 return ui::devtools::protocol::Response::OK();
105 } 113 }
106 114
107 } // namespace devtools 115 } // namespace devtools
108 } // namespace ash 116 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/devtools/ash_devtools_dom_agent.h ('k') | third_party/WebKit/Source/core/inspector/DOMEditor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698