| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) { | 316 void Window::SetExternalTexture(ui::Texture* texture) { |
| 317 printf("\t%d\tWindow::SetExternalTexture this %p tex %p\n", |
| 318 getpid(), this, texture); |
| 317 layer_->SetExternalTexture(texture); | 319 layer_->SetExternalTexture(texture); |
| 318 } | 320 } |
| 319 | 321 |
| 320 void Window::SetDefaultParentByRootWindow(RootWindow* root_window, | 322 void Window::SetDefaultParentByRootWindow(RootWindow* root_window, |
| 321 const gfx::Rect& bounds_in_screen) { | 323 const gfx::Rect& bounds_in_screen) { |
| 322 DCHECK(root_window); | 324 DCHECK(root_window); |
| 323 | 325 |
| 324 // Stacking clients are mandatory on RootWindow objects. | 326 // Stacking clients are mandatory on RootWindow objects. |
| 325 client::StackingClient* client = client::GetStackingClient(root_window); | 327 client::StackingClient* client = client::GetStackingClient(root_window); |
| 326 DCHECK(client); | 328 DCHECK(client); |
| (...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1044 bool contains_mouse = false; | 1046 bool contains_mouse = false; |
| 1045 if (IsVisible()) { | 1047 if (IsVisible()) { |
| 1046 RootWindow* root_window = GetRootWindow(); | 1048 RootWindow* root_window = GetRootWindow(); |
| 1047 contains_mouse = root_window && | 1049 contains_mouse = root_window && |
| 1048 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); | 1050 ContainsPointInRoot(root_window->GetLastMouseLocationInRoot()); |
| 1049 } | 1051 } |
| 1050 return contains_mouse; | 1052 return contains_mouse; |
| 1051 } | 1053 } |
| 1052 | 1054 |
| 1053 } // namespace aura | 1055 } // namespace aura |
| OLD | NEW |