| OLD | NEW | 
|     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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   163   } |   163   } | 
|   164   prop_map_.clear(); |   164   prop_map_.clear(); | 
|   165  |   165  | 
|   166   // The layer will either be destroyed by |layer_owner_|'s dtor, or by whoever |   166   // The layer will either be destroyed by |layer_owner_|'s dtor, or by whoever | 
|   167   // acquired it. |   167   // acquired it. | 
|   168   layer()->set_delegate(NULL); |   168   layer()->set_delegate(NULL); | 
|   169   DestroyLayer(); |   169   DestroyLayer(); | 
|   170 } |   170 } | 
|   171  |   171  | 
|   172 void Window::Init(ui::LayerType layer_type) { |   172 void Window::Init(ui::LayerType layer_type) { | 
|   173   SetLayer(new ui::Layer(layer_type)); |   173   SetLayer(base::MakeUnique<ui::Layer>(layer_type)); | 
|   174   layer()->SetVisible(false); |   174   layer()->SetVisible(false); | 
|   175   layer()->set_delegate(this); |   175   layer()->set_delegate(this); | 
|   176   UpdateLayerName(); |   176   UpdateLayerName(); | 
|   177   layer()->SetFillsBoundsOpaquely(!transparent_); |   177   layer()->SetFillsBoundsOpaquely(!transparent_); | 
|   178   Env::GetInstance()->NotifyWindowInitialized(this); |   178   Env::GetInstance()->NotifyWindowInitialized(this); | 
|   179 } |   179 } | 
|   180  |   180  | 
|   181 void Window::SetType(ui::wm::WindowType type) { |   181 void Window::SetType(ui::wm::WindowType type) { | 
|   182   // Cannot change type after the window is initialized. |   182   // Cannot change type after the window is initialized. | 
|   183   DCHECK(!layer()); |   183   DCHECK(!layer()); | 
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1105     layer_name = "Unnamed Window"; |  1105     layer_name = "Unnamed Window"; | 
|  1106  |  1106  | 
|  1107   if (id_ != -1) |  1107   if (id_ != -1) | 
|  1108     layer_name += " " + base::IntToString(id_); |  1108     layer_name += " " + base::IntToString(id_); | 
|  1109  |  1109  | 
|  1110   layer()->set_name(layer_name); |  1110   layer()->set_name(layer_name); | 
|  1111 #endif |  1111 #endif | 
|  1112 } |  1112 } | 
|  1113  |  1113  | 
|  1114 }  // namespace aura |  1114 }  // namespace aura | 
| OLD | NEW |