| Index: ui/events/event_processor.h
|
| diff --git a/ui/events/event_processor.h b/ui/events/event_processor.h
|
| index 82d30ce1dfaedb18f1e4122717c284b5da79e383..7be5f2d3498806879d29c4c7094cd329475433c5 100644
|
| --- a/ui/events/event_processor.h
|
| +++ b/ui/events/event_processor.h
|
| @@ -6,18 +6,23 @@
|
| #define UI_EVENTS_EVENT_PROCESSOR_H_
|
|
|
| #include "ui/events/event_dispatcher.h"
|
| +#include "ui/events/event_sink.h"
|
| #include "ui/events/event_source.h"
|
|
|
| namespace ui {
|
|
|
| class EventTargeter;
|
|
|
| -// EventProcessor receives an event from an EventSource and dispatches it to a
|
| -// tree of EventTargets.
|
| -class EVENTS_EXPORT EventProcessor : public EventDispatcherDelegate {
|
| +// EventProcessor inherits EventSink to receive an event from an EventSource
|
| +// and dispatches it to a tree of EventTargets.
|
| +class EVENTS_EXPORT EventProcessor : public EventDispatcherDelegate,
|
| + public EventSink {
|
| public:
|
| ~EventProcessor() override {}
|
|
|
| + // EventSink overrides:
|
| + EventDispatchDetails OnEventFromSource(Event* event) override;
|
| +
|
| // Returns the EventTarget with the right EventTargeter that we should use for
|
| // dispatching this |event|.
|
| virtual EventTarget* GetRootForEvent(Event* event) = 0;
|
| @@ -26,15 +31,6 @@ class EVENTS_EXPORT EventProcessor : public EventDispatcherDelegate {
|
| // targeter set, then the default targeter is used to find the target.
|
| virtual EventTargeter* GetDefaultEventTargeter() = 0;
|
|
|
| - // Dispatches an event received from the EventSource to the tree of
|
| - // EventTargets (whose root is returned by GetRootTarget()). The co-ordinate
|
| - // space of the source must be the same as the root target, except that the
|
| - // target may have a high-dpi scale applied.
|
| - // TODO(tdanderson|sadrul): This is only virtual for testing purposes. It
|
| - // should not be virtual at all.
|
| - virtual EventDispatchDetails OnEventFromSource(Event* event)
|
| - WARN_UNUSED_RESULT;
|
| -
|
| protected:
|
| // Invoked at the start of processing, before an EventTargeter is used to
|
| // find the target of the event. If processing should not take place, marks
|
|
|