| 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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 SetBoundsInternal(final_bounds); | 306 SetBoundsInternal(final_bounds); |
| 307 } | 307 } |
| 308 } | 308 } |
| 309 | 309 |
| 310 void Window::SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen, | 310 void Window::SetBoundsInScreen(const gfx::Rect& new_bounds_in_screen, |
| 311 const display::Display& dst_display) { | 311 const display::Display& dst_display) { |
| 312 Window* root = GetRootWindow(); | 312 Window* root = GetRootWindow(); |
| 313 if (root) { | 313 if (root) { |
| 314 aura::client::ScreenPositionClient* screen_position_client = | 314 aura::client::ScreenPositionClient* screen_position_client = |
| 315 aura::client::GetScreenPositionClient(root); | 315 aura::client::GetScreenPositionClient(root); |
| 316 if (screen_position_client) { | 316 screen_position_client->SetBounds(this, new_bounds_in_screen, dst_display); |
| 317 screen_position_client->SetBounds(this, new_bounds_in_screen, | 317 return; |
| 318 dst_display); | |
| 319 return; | |
| 320 } | |
| 321 } | 318 } |
| 322 SetBounds(new_bounds_in_screen); | 319 SetBounds(new_bounds_in_screen); |
| 323 } | 320 } |
| 324 | 321 |
| 325 gfx::Rect Window::GetTargetBounds() const { | 322 gfx::Rect Window::GetTargetBounds() const { |
| 326 return layer() ? layer()->GetTargetBounds() : bounds(); | 323 return layer() ? layer()->GetTargetBounds() : bounds(); |
| 327 } | 324 } |
| 328 | 325 |
| 329 void Window::SchedulePaintInRect(const gfx::Rect& rect) { | 326 void Window::SchedulePaintInRect(const gfx::Rect& rect) { |
| 330 layer()->SchedulePaint(rect); | 327 layer()->SchedulePaint(rect); |
| (...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1118 layer_name = "Unnamed Window"; | 1115 layer_name = "Unnamed Window"; |
| 1119 | 1116 |
| 1120 if (id_ != -1) | 1117 if (id_ != -1) |
| 1121 layer_name += " " + base::IntToString(id_); | 1118 layer_name += " " + base::IntToString(id_); |
| 1122 | 1119 |
| 1123 layer()->set_name(layer_name); | 1120 layer()->set_name(layer_name); |
| 1124 #endif | 1121 #endif |
| 1125 } | 1122 } |
| 1126 | 1123 |
| 1127 } // namespace aura | 1124 } // namespace aura |
| OLD | NEW |