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

Unified Diff: ui/aura/window.cc

Issue 8741018: Revert 112232 - Added hotkey support to 8508009 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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 | « ui/aura/window.h ('k') | ui/aura_shell/desktop_background_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window.cc
===================================================================
--- ui/aura/window.cc (revision 112233)
+++ ui/aura/window.cc (working copy)
@@ -78,8 +78,20 @@
layer_.reset(new ui::Layer(layer_type));
layer_->SetVisible(false);
layer_->set_delegate(this);
- UpdateLayerName(name_);
+#if !defined(NDEBUG)
+ std::string layer_name(name_);
+ if (layer_name.empty())
+ layer_name.append("Unnamed Window");
+
+ if (id_ != -1) {
+ char id_buf[10];
+ base::snprintf(id_buf, sizeof(id_buf), " %d", id_);
+ layer_name.append(id_buf);
+ }
+ layer_->set_name(layer_name);
+#endif
+
Desktop::GetInstance()->WindowInitialized(this);
}
@@ -89,13 +101,6 @@
type_ = type;
}
-void Window::SetName(const std::string& name) {
- name_ = name;
-
- if (layer())
- UpdateLayerName(name_);
-}
-
void Window::Show() {
SetVisible(true);
}
@@ -538,21 +543,4 @@
delegate_->OnPaint(canvas);
}
-void Window::UpdateLayerName(const std::string& name) {
-#if !defined(NDEBUG)
- DCHECK(layer());
-
- std::string layer_name(name_);
- if (layer_name.empty())
- layer_name.append("Unnamed Window");
-
- if (id_ != -1) {
- char id_buf[10];
- base::snprintf(id_buf, sizeof(id_buf), " %d", id_);
- layer_name.append(id_buf);
- }
- layer()->set_name(layer_name);
-#endif
-}
-
} // namespace aura
« no previous file with comments | « ui/aura/window.h ('k') | ui/aura_shell/desktop_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698