Chromium Code Reviews| Index: ui/aura/window.cc |
| diff --git a/ui/aura/window.cc b/ui/aura/window.cc |
| index d1caa0416e6eab3ea3e35464644793eef6d29341..a35fba055b3c988ce1957875fa36b83647c27f3f 100644 |
| --- a/ui/aura/window.cc |
| +++ b/ui/aura/window.cc |
| @@ -8,6 +8,7 @@ |
| #include "base/logging.h" |
| #include "base/stl_util.h" |
| +#include "base/string_util.h" |
| #include "ui/aura/client/stacking_client.h" |
| #include "ui/aura/desktop.h" |
| #include "ui/aura/event.h" |
| @@ -74,6 +75,18 @@ void Window::Init(ui::Layer::LayerType layer_type) { |
| layer_.reset(new ui::Layer(Desktop::GetInstance()->compositor(), layer_type)); |
| layer_->SetVisible(false); |
| layer_->set_delegate(this); |
| +#if ndef NDEBUG |
|
tfarina
2011/11/11 18:46:28
nit: #ifndef
Ben Goodger (Google)
2011/11/14 22:59:09
mostly we do !defined()
|
| + std::string layer_name(name()); |
|
tfarina
2011/11/11 18:46:28
nit: name() -> name_
|
| + if (layer_name.empty()) |
| + layer_name.append("Unnamed Window"); |
| + |
| + if (id() != -1) { |
|
tfarina
2011/11/11 18:46:28
nit: id() -> id_
|
| + char id_buf[10]; |
| + base::snprintf(id_buf, sizeof(id_buf), " %d", id()); |
|
tfarina
2011/11/11 18:46:28
nit: id() -> id_
|
| + layer_name.append(id_buf); |
|
Ben Goodger (Google)
2011/11/14 22:59:09
I agree with tfarina's nits here, prevalent style
|
| + } |
| + layer_->set_name(layer_name); |
| +#endif |
| } |
| void Window::SetType(WindowType type) { |