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/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 Loading... |
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 |
OLD | NEW |