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

Unified Diff: ash/common/devtools/ash_devtools_dom_agent.cc

Issue 2483653002: Update ash DOM agent so that widgets are direct children of windows (Closed)
Patch Set: Update ash DOM agent so that widgets are direct children of windows 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/common/devtools/ash_devtools_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/devtools/ash_devtools_dom_agent.cc
diff --git a/ash/common/devtools/ash_devtools_dom_agent.cc b/ash/common/devtools/ash_devtools_dom_agent.cc
index 8640892d34058c41bf04db7ee5f345c1f347a7d3..fca24efa4799afe22978610c1f5cd75c60405b37 100644
--- a/ash/common/devtools/ash_devtools_dom_agent.cc
+++ b/ash/common/devtools/ash_devtools_dom_agent.cc
@@ -129,11 +129,11 @@ void AshDevToolsDOMAgent::OnWindowStackingChanged(WmWindow* window) {
std::unique_ptr<DOM::Node> AshDevToolsDOMAgent::BuildTreeForWindow(
ash::WmWindow* window) {
std::unique_ptr<Array<DOM::Node>> children = Array<DOM::Node>::create();
+ views::Widget* widget = window->GetInternalWidget();
+ if (widget)
+ children->addItem(BuildTreeForRootWidget(widget));
for (ash::WmWindow* child : window->GetChildren()) {
children->addItem(BuildTreeForWindow(child));
- views::Widget* widget = child->GetInternalWidget();
- if (widget)
- children->addItem(BuildTreeForRootWidget(widget));
}
std::unique_ptr<ui::devtools::protocol::DOM::Node> node =
BuildNode("Window", GetAttributes(window), std::move(children));
« no previous file with comments | « no previous file | ash/common/devtools/ash_devtools_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698