Chromium Code Reviews| Index: components/mus/ws/server_window.cc |
| diff --git a/components/mus/ws/server_window.cc b/components/mus/ws/server_window.cc |
| index eeb5d7d44929e0275c949faff176438dcd2b5b56..2dea439196a37f6a2c87b4530228dfe37ab8b45b 100644 |
| --- a/components/mus/ws/server_window.cc |
| +++ b/components/mus/ws/server_window.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/strings/stringprintf.h" |
| #include "components/mus/common/transient_window_utils.h" |
| +#include "components/mus/public/interfaces/window_manager.mojom.h" |
| #include "components/mus/ws/server_window_delegate.h" |
| #include "components/mus/ws/server_window_observer.h" |
| #include "components/mus/ws/server_window_surface_manager.h" |
| @@ -345,6 +346,13 @@ void ServerWindow::SetProperty(const std::string& name, |
| OnWindowSharedPropertyChanged(this, name, value)); |
| } |
| +std::string ServerWindow::GetName() const { |
| + auto it = properties_.find(mojom::WindowManager::kName_Property); |
| + if (it == properties_.end()) |
| + return std::string(); |
| + return std::string(it->second.begin(), it->second.end()); |
|
msw
2016/05/05 22:12:07
nit: use the property_type_converter?
James Cook
2016/05/05 22:53:18
I can't, property_type_converters.cc is in compone
msw
2016/05/05 23:10:06
Nah, I guess this is fine as-is.
|
| +} |
| + |
| void ServerWindow::SetTextInputState(const ui::TextInputState& state) { |
| const bool changed = !(text_input_state_ == state); |
| if (changed) { |
| @@ -402,10 +410,10 @@ std::string ServerWindow::GetDebugWindowHierarchy() const { |
| void ServerWindow::BuildDebugInfo(const std::string& depth, |
| std::string* result) const { |
| *result += base::StringPrintf( |
| - "%sid=%d,%d visible=%s bounds=%d,%d %dx%d" PRIu64 "\n", depth.c_str(), |
| + "%sid=%d,%d visible=%s bounds=%d,%d %dx%d %s\n", depth.c_str(), |
|
msw
2016/05/05 22:12:08
nit: maybe name='%s'?
James Cook
2016/05/05 22:53:18
Done.
|
| static_cast<int>(id_.connection_id), static_cast<int>(id_.window_id), |
| visible_ ? "true" : "false", bounds_.x(), bounds_.y(), bounds_.width(), |
| - bounds_.height()); |
| + bounds_.height(), GetName().c_str()); |
| for (const ServerWindow* child : children_) |
| child->BuildDebugInfo(depth + " ", result); |
| } |