Chromium Code Reviews| Index: services/ui/ws/server_window.cc |
| diff --git a/services/ui/ws/server_window.cc b/services/ui/ws/server_window.cc |
| index ad93327070e5dbf753b81401ef548a98ee115f0f..a87a027243e755ff15c7b0132998c1e7c30c483f 100644 |
| --- a/services/ui/ws/server_window.cc |
| +++ b/services/ui/ws/server_window.cc |
| @@ -381,21 +381,25 @@ void ServerWindow::SetUnderlayOffset(const gfx::Vector2d& offset) { |
| delegate_->OnScheduleWindowPaint(this); |
| } |
| -#if !defined(NDEBUG) |
| +#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON) |
| std::string ServerWindow::GetDebugWindowHierarchy() const { |
| std::string result; |
| BuildDebugInfo(std::string(), &result); |
| return result; |
| } |
| -void ServerWindow::BuildDebugInfo(const std::string& depth, |
| - std::string* result) const { |
| +std::string ServerWindow::GetDebugWindowInfo() const { |
| std::string name = GetName(); |
| - *result += base::StringPrintf( |
| - "%sid=%d,%d visible=%s bounds=%d,%d %dx%d %s\n", depth.c_str(), |
| - static_cast<int>(id_.client_id), static_cast<int>(id_.window_id), |
| + return base::StringPrintf( |
| + "id=%u:%u visible=%s bounds=%d,%d %dx%d %s", id_.client_id, id_.window_id, |
|
sky
2016/08/17 19:01:05
id_.ToString() ?
kylechar
2016/08/17 19:10:12
Done.
|
| visible_ ? "true" : "false", bounds_.x(), bounds_.y(), bounds_.width(), |
| bounds_.height(), !name.empty() ? name.c_str() : "(no name)"); |
| +} |
| + |
| +void ServerWindow::BuildDebugInfo(const std::string& depth, |
| + std::string* result) const { |
| + *result += |
| + base::StringPrintf("%s%s\n", depth.c_str(), GetDebugWindowInfo().c_str()); |
| for (const ServerWindow* child : children_) |
| child->BuildDebugInfo(depth + " ", result); |
| } |