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

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

Issue 2459653003: [M55] Generalize layer mirroring for phantom windows (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 prop_map_.clear(); 165 prop_map_.clear();
166 166
167 // The layer will either be destroyed by |layer_owner_|'s dtor, or by whoever 167 // The layer will either be destroyed by |layer_owner_|'s dtor, or by whoever
168 // acquired it. 168 // acquired it.
169 layer()->set_delegate(NULL); 169 layer()->set_delegate(NULL);
170 DestroyLayer(); 170 DestroyLayer();
171 } 171 }
172 172
173 void Window::Init(ui::LayerType layer_type) { 173 void Window::Init(ui::LayerType layer_type) {
174 SetLayer(new ui::Layer(layer_type)); 174 SetLayer(base::MakeUnique<ui::Layer>(layer_type));
175 layer()->SetVisible(false); 175 layer()->SetVisible(false);
176 layer()->set_delegate(this); 176 layer()->set_delegate(this);
177 UpdateLayerName(); 177 UpdateLayerName();
178 layer()->SetFillsBoundsOpaquely(!transparent_); 178 layer()->SetFillsBoundsOpaquely(!transparent_);
179 Env::GetInstance()->NotifyWindowInitialized(this); 179 Env::GetInstance()->NotifyWindowInitialized(this);
180 } 180 }
181 181
182 void Window::SetType(ui::wm::WindowType type) { 182 void Window::SetType(ui::wm::WindowType type) {
183 // Cannot change type after the window is initialized. 183 // Cannot change type after the window is initialized.
184 DCHECK(!layer()); 184 DCHECK(!layer());
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 layer_name = "Unnamed Window"; 1118 layer_name = "Unnamed Window";
1119 1119
1120 if (id_ != -1) 1120 if (id_ != -1)
1121 layer_name += " " + base::IntToString(id_); 1121 layer_name += " " + base::IntToString(id_);
1122 1122
1123 layer()->set_name(layer_name); 1123 layer()->set_name(layer_name);
1124 #endif 1124 #endif
1125 } 1125 }
1126 1126
1127 } // namespace aura 1127 } // namespace aura
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_custom_notification_view.cc ('k') | ui/compositor/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698