| 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 #ifndef UI_EVENTS_EVENT_TARGET_H_ | 5 #ifndef UI_EVENTS_EVENT_TARGET_H_ |
| 6 #define UI_EVENTS_EVENT_TARGET_H_ | 6 #define UI_EVENTS_EVENT_TARGET_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 EventTarget(); | 40 EventTarget(); |
| 41 ~EventTarget() override; | 41 ~EventTarget() override; |
| 42 | 42 |
| 43 virtual bool CanAcceptEvent(const Event& event) = 0; | 43 virtual bool CanAcceptEvent(const Event& event) = 0; |
| 44 | 44 |
| 45 // Returns the parent EventTarget in the event-target tree. | 45 // Returns the parent EventTarget in the event-target tree. |
| 46 virtual EventTarget* GetParentTarget() = 0; | 46 virtual EventTarget* GetParentTarget() = 0; |
| 47 | 47 |
| 48 // Returns an iterator an EventTargeter can use to iterate over the list of | 48 // Returns an iterator an EventTargeter can use to iterate over the list of |
| 49 // child EventTargets. | 49 // child EventTargets. |
| 50 virtual scoped_ptr<EventTargetIterator> GetChildIterator() const = 0; | 50 virtual scoped_ptr<EventTargetIterator> GetChildIterator() = 0; |
| 51 | 51 |
| 52 // Returns the EventTargeter that should be used to find the target for an | 52 // Returns the EventTargeter that should be used to find the target for an |
| 53 // event in the subtree rooted at this EventTarget. | 53 // event in the subtree rooted at this EventTarget. |
| 54 virtual EventTargeter* GetEventTargeter() = 0; | 54 virtual EventTargeter* GetEventTargeter() = 0; |
| 55 | 55 |
| 56 // Updates the states in |event| (e.g. location) to be suitable for |target|, | 56 // Updates the states in |event| (e.g. location) to be suitable for |target|, |
| 57 // so that |event| can be dispatched to |target|. | 57 // so that |event| can be dispatched to |target|. |
| 58 virtual void ConvertEventToTarget(EventTarget* target, | 58 virtual void ConvertEventToTarget(EventTarget* target, |
| 59 LocatedEvent* event); | 59 LocatedEvent* event); |
| 60 | 60 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 EventHandlerList pre_target_list_; | 109 EventHandlerList pre_target_list_; |
| 110 EventHandlerList post_target_list_; | 110 EventHandlerList post_target_list_; |
| 111 EventHandler* target_handler_; | 111 EventHandler* target_handler_; |
| 112 | 112 |
| 113 DISALLOW_COPY_AND_ASSIGN(EventTarget); | 113 DISALLOW_COPY_AND_ASSIGN(EventTarget); |
| 114 }; | 114 }; |
| 115 | 115 |
| 116 } // namespace ui | 116 } // namespace ui |
| 117 | 117 |
| 118 #endif // UI_EVENTS_EVENT_TARGET_H_ | 118 #endif // UI_EVENTS_EVENT_TARGET_H_ |
| OLD | NEW |