| 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 if (screen_position_client) { | 248 if (screen_position_client) { |
| 249 gfx::Point origin = bounds.origin(); | 249 gfx::Point origin = bounds.origin(); |
| 250 screen_position_client->ConvertPointToScreen(root, &origin); | 250 screen_position_client->ConvertPointToScreen(root, &origin); |
| 251 bounds.set_origin(origin); | 251 bounds.set_origin(origin); |
| 252 } | 252 } |
| 253 } | 253 } |
| 254 return bounds; | 254 return bounds; |
| 255 } | 255 } |
| 256 | 256 |
| 257 void Window::SetTransform(const gfx::Transform& transform) { | 257 void Window::SetTransform(const gfx::Transform& transform) { |
| 258 if (transform == this->transform()) |
| 259 return; |
| 260 |
| 258 for (WindowObserver& observer : observers_) | 261 for (WindowObserver& observer : observers_) |
| 259 observer.OnWindowTransforming(this); | 262 observer.OnWindowTransforming(this); |
| 260 layer()->SetTransform(transform); | 263 layer()->SetTransform(transform); |
| 261 for (WindowObserver& observer : observers_) | 264 for (WindowObserver& observer : observers_) |
| 262 observer.OnWindowTransformed(this); | 265 observer.OnWindowTransformed(this); |
| 263 NotifyAncestorWindowTransformed(this); | 266 NotifyAncestorWindowTransformed(this); |
| 264 } | 267 } |
| 265 | 268 |
| 266 void Window::SetLayoutManager(LayoutManager* layout_manager) { | 269 void Window::SetLayoutManager(LayoutManager* layout_manager) { |
| 267 if (layout_manager == layout_manager_.get()) | 270 if (layout_manager == layout_manager_.get()) |
| (...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1085 layer_name = "Unnamed Window"; | 1088 layer_name = "Unnamed Window"; |
| 1086 | 1089 |
| 1087 if (id_ != -1) | 1090 if (id_ != -1) |
| 1088 layer_name += " " + base::IntToString(id_); | 1091 layer_name += " " + base::IntToString(id_); |
| 1089 | 1092 |
| 1090 layer()->set_name(layer_name); | 1093 layer()->set_name(layer_name); |
| 1091 #endif | 1094 #endif |
| 1092 } | 1095 } |
| 1093 | 1096 |
| 1094 } // namespace aura | 1097 } // namespace aura |
| OLD | NEW |