| 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/root_window.h" | 5 #include "ui/aura/root_window.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 // If the layer is not animating, then we need to update the host size | 445 // If the layer is not animating, then we need to update the host size |
| 446 // immediately. | 446 // immediately. |
| 447 if (!layer()->GetAnimator()->is_animating()) | 447 if (!layer()->GetAnimator()->is_animating()) |
| 448 OnHostResized(host_->GetBounds().size()); | 448 OnHostResized(host_->GetBounds().size()); |
| 449 } | 449 } |
| 450 | 450 |
| 451 //////////////////////////////////////////////////////////////////////////////// | 451 //////////////////////////////////////////////////////////////////////////////// |
| 452 // RootWindow, ui::EventTarget implementation: | 452 // RootWindow, ui::EventTarget implementation: |
| 453 | 453 |
| 454 ui::EventTarget* RootWindow::GetParentTarget() { | 454 ui::EventTarget* RootWindow::GetParentTarget() { |
| 455 return Env::GetInstance(); | 455 return client::GetEventClient(this) ? |
| 456 client::GetEventClient(this)->GetToplevelEventTarget() : |
| 457 Env::GetInstance(); |
| 456 } | 458 } |
| 457 | 459 |
| 458 //////////////////////////////////////////////////////////////////////////////// | 460 //////////////////////////////////////////////////////////////////////////////// |
| 459 // RootWindow, ui::CompositorDelegate implementation: | 461 // RootWindow, ui::CompositorDelegate implementation: |
| 460 | 462 |
| 461 void RootWindow::ScheduleDraw() { | 463 void RootWindow::ScheduleDraw() { |
| 462 if (!defer_draw_scheduling_) { | 464 if (!defer_draw_scheduling_) { |
| 463 defer_draw_scheduling_ = true; | 465 defer_draw_scheduling_ = true; |
| 464 MessageLoop::current()->PostTask( | 466 MessageLoop::current()->PostTask( |
| 465 FROM_HERE, | 467 FROM_HERE, |
| (...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 ui::MouseEvent event(ui::ET_MOUSE_MOVED, | 1029 ui::MouseEvent event(ui::ET_MOUSE_MOVED, |
| 1028 orig_mouse_location, | 1030 orig_mouse_location, |
| 1029 orig_mouse_location, | 1031 orig_mouse_location, |
| 1030 ui::EF_IS_SYNTHESIZED); | 1032 ui::EF_IS_SYNTHESIZED); |
| 1031 event.set_system_location(Env::GetInstance()->last_mouse_location()); | 1033 event.set_system_location(Env::GetInstance()->last_mouse_location()); |
| 1032 OnHostMouseEvent(&event); | 1034 OnHostMouseEvent(&event); |
| 1033 #endif | 1035 #endif |
| 1034 } | 1036 } |
| 1035 | 1037 |
| 1036 } // namespace aura | 1038 } // namespace aura |
| OLD | NEW |