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

Side by Side Diff: ui/aura/window.cc

Issue 2381183002: mash: Fix shelf window property use in Chrome. (Closed)
Patch Set: Sync and rebase; add comments. Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/window.h" 5 #include "ui/aura/window.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <utility> 10 #include <utility>
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 type_ = type; 185 type_ = type;
186 } 186 }
187 187
188 void Window::SetName(const std::string& name) { 188 void Window::SetName(const std::string& name) {
189 name_ = name; 189 name_ = name;
190 if (layer()) 190 if (layer())
191 UpdateLayerName(); 191 UpdateLayerName();
192 } 192 }
193 193
194 void Window::SetTitle(const base::string16& title) { 194 void Window::SetTitle(const base::string16& title) {
195 if (title == title_)
196 return;
195 title_ = title; 197 title_ = title;
196 FOR_EACH_OBSERVER(WindowObserver, 198 FOR_EACH_OBSERVER(WindowObserver,
197 observers_, 199 observers_,
198 OnWindowTitleChanged(this)); 200 OnWindowTitleChanged(this));
199 } 201 }
200 202
201 void Window::SetTransparent(bool transparent) { 203 void Window::SetTransparent(bool transparent) {
202 transparent_ = transparent; 204 transparent_ = transparent;
203 if (layer()) 205 if (layer())
204 layer()->SetFillsBoundsOpaquely(!transparent_); 206 layer()->SetFillsBoundsOpaquely(!transparent_);
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 layer_name = "Unnamed Window"; 1118 layer_name = "Unnamed Window";
1117 1119
1118 if (id_ != -1) 1120 if (id_ != -1)
1119 layer_name += " " + base::IntToString(id_); 1121 layer_name += " " + base::IntToString(id_);
1120 1122
1121 layer()->set_name(layer_name); 1123 layer()->set_name(layer_name);
1122 #endif 1124 #endif
1123 } 1125 }
1124 1126
1125 } // namespace aura 1127 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698