| 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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 EventFilters filters; | 648 EventFilters filters; |
| 649 if (target == this) | 649 if (target == this) |
| 650 GetEventFiltersToNotify(target, &filters); | 650 GetEventFiltersToNotify(target, &filters); |
| 651 else | 651 else |
| 652 GetEventFiltersToNotify(target->parent(), &filters); | 652 GetEventFiltersToNotify(target->parent(), &filters); |
| 653 | 653 |
| 654 // |target| can be deleted by any of the handlers below. | 654 // |target| can be deleted by any of the handlers below. |
| 655 WindowTracker tracker; | 655 WindowTracker tracker; |
| 656 tracker.Add(target); | 656 tracker.Add(target); |
| 657 | 657 |
| 658 ui::Event::DispatcherApi dispatcher(event); |
| 659 dispatcher.set_target(target); |
| 658 for (EventFilters::const_reverse_iterator it = filters.rbegin(), | 660 for (EventFilters::const_reverse_iterator it = filters.rbegin(), |
| 659 rend = filters.rend(); | 661 rend = filters.rend(); |
| 660 it != rend; ++it) { | 662 it != rend; ++it) { |
| 661 ui::TouchStatus status = (*it)->PreHandleTouchEvent(target, event); | 663 ui::TouchStatus status = (*it)->PreHandleTouchEvent(target, event); |
| 662 if (status != ui::TOUCH_STATUS_UNKNOWN) | 664 if (status != ui::TOUCH_STATUS_UNKNOWN) |
| 663 return status; | 665 return status; |
| 664 } | 666 } |
| 665 | 667 |
| 666 if (tracker.Contains(target) && target->delegate()) { | 668 if (tracker.Contains(target) && target->delegate()) { |
| 667 ui::TouchStatus status = target->delegate()->OnTouchEvent(event); | 669 ui::TouchStatus status = target->delegate()->OnTouchEvent(event); |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1064 void RootWindow::UnlockCompositor() { | 1066 void RootWindow::UnlockCompositor() { |
| 1065 DCHECK(compositor_lock_); | 1067 DCHECK(compositor_lock_); |
| 1066 compositor_lock_ = NULL; | 1068 compositor_lock_ = NULL; |
| 1067 if (draw_on_compositor_unlock_) { | 1069 if (draw_on_compositor_unlock_) { |
| 1068 draw_on_compositor_unlock_ = false; | 1070 draw_on_compositor_unlock_ = false; |
| 1069 ScheduleDraw(); | 1071 ScheduleDraw(); |
| 1070 } | 1072 } |
| 1071 } | 1073 } |
| 1072 | 1074 |
| 1073 } // namespace aura | 1075 } // namespace aura |
| OLD | NEW |