| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/events/test/test_event_target.h" | 5 #include "ui/events/test/test_event_target.h" |
| 6 | 6 |
| 7 #include <algorithm> |
| 7 #include <utility> | 8 #include <utility> |
| 8 | 9 |
| 9 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| 10 #include "ui/events/event.h" | 11 #include "ui/events/event.h" |
| 11 #include "ui/events/event_target_iterator.h" | 12 #include "ui/events/event_target_iterator.h" |
| 12 #include "ui/events/event_targeter.h" | 13 #include "ui/events/event_targeter.h" |
| 13 | 14 |
| 14 namespace ui { | 15 namespace ui { |
| 15 namespace test { | 16 namespace test { |
| 16 | 17 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // TestEventTarget, private | 93 // TestEventTarget, private |
| 93 | 94 |
| 94 bool TestEventTarget::Contains(TestEventTarget* target) const { | 95 bool TestEventTarget::Contains(TestEventTarget* target) const { |
| 95 while (target && target != this) | 96 while (target && target != this) |
| 96 target = target->parent(); | 97 target = target->parent(); |
| 97 return target == this; | 98 return target == this; |
| 98 } | 99 } |
| 99 | 100 |
| 100 } // namespace test | 101 } // namespace test |
| 101 } // namespace ui | 102 } // namespace ui |
| OLD | NEW |