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

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

Issue 2222703002: Aura Icon Capture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Icons To Aura::Window Created 4 years, 4 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 title_ = title; 195 title_ = title;
196 FOR_EACH_OBSERVER(WindowObserver, 196 FOR_EACH_OBSERVER(WindowObserver,
197 observers_, 197 observers_,
198 OnWindowTitleChanged(this)); 198 OnWindowTitleChanged(this));
199 } 199 }
200 200
201 void Window::SetIcon(const gfx::ImageSkia& icon) {
202 if (!icon.isNull()) {
203 icon_ = icon;
204 }
205 }
206
201 void Window::SetTransparent(bool transparent) { 207 void Window::SetTransparent(bool transparent) {
202 transparent_ = transparent; 208 transparent_ = transparent;
203 if (layer()) 209 if (layer())
204 layer()->SetFillsBoundsOpaquely(!transparent_); 210 layer()->SetFillsBoundsOpaquely(!transparent_);
205 } 211 }
206 212
207 void Window::SetFillsBoundsCompletely(bool fills_bounds) { 213 void Window::SetFillsBoundsCompletely(bool fills_bounds) {
208 layer()->SetFillsBoundsCompletely(fills_bounds); 214 layer()->SetFillsBoundsCompletely(fills_bounds);
209 } 215 }
210 216
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 layer_name = "Unnamed Window"; 1122 layer_name = "Unnamed Window";
1117 1123
1118 if (id_ != -1) 1124 if (id_ != -1)
1119 layer_name += " " + base::IntToString(id_); 1125 layer_name += " " + base::IntToString(id_);
1120 1126
1121 layer()->set_name(layer_name); 1127 layer()->set_name(layer_name);
1122 #endif 1128 #endif
1123 } 1129 }
1124 1130
1125 } // namespace aura 1131 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698