| 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 <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 306 return layer_->bounds(); | 306 return layer_->bounds(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 void Window::SchedulePaintInRect(const gfx::Rect& rect) { | 309 void Window::SchedulePaintInRect(const gfx::Rect& rect) { |
| 310 if (layer_->SchedulePaint(rect)) { | 310 if (layer_->SchedulePaint(rect)) { |
| 311 FOR_EACH_OBSERVER( | 311 FOR_EACH_OBSERVER( |
| 312 WindowObserver, observers_, OnWindowPaintScheduled(this, rect)); | 312 WindowObserver, observers_, OnWindowPaintScheduled(this, rect)); |
| 313 } | 313 } |
| 314 } | 314 } |
| 315 | 315 |
| 316 void Window::SetExternalTexture(ui::Texture* texture) { | |
| 317 layer_->SetExternalTexture(texture); | |
| 318 } | |
| 319 | |
| 320 void Window::SetDefaultParentByRootWindow(RootWindow* root_window, | 316 void Window::SetDefaultParentByRootWindow(RootWindow* root_window, |
| 321 const gfx::Rect& bounds_in_screen) { | 317 const gfx::Rect& bounds_in_screen) { |
| 322 DCHECK(root_window); | 318 DCHECK(root_window); |
| 323 | 319 |
| 324 // Stacking clients are mandatory on RootWindow objects. | 320 // Stacking clients are mandatory on RootWindow objects. |
| 325 client::StackingClient* client = client::GetStackingClient(root_window); | 321 client::StackingClient* client = client::GetStackingClient(root_window); |
| 326 DCHECK(client); | 322 DCHECK(client); |
| 327 | 323 |
| 328 aura::Window* default_parent = client->GetDefaultParent( | 324 aura::Window* default_parent = client->GetDefaultParent( |
| 329 root_window, this, bounds_in_screen); | 325 root_window, this, bounds_in_screen); |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1100 bool contains_mouse = false; | 1096 bool contains_mouse = false; |
| 1101 if (IsVisible()) { | 1097 if (IsVisible()) { |
| 1102 RootWindow* root_window = GetRootWindow(); | 1098 RootWindow* root_window = GetRootWindow(); |
| 1103 contains_mouse = root_window && | 1099 contains_mouse = root_window && |
| 1104 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); | 1100 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); |
| 1105 } | 1101 } |
| 1106 return contains_mouse; | 1102 return contains_mouse; |
| 1107 } | 1103 } |
| 1108 | 1104 |
| 1109 } // namespace aura | 1105 } // namespace aura |
| OLD | NEW |