Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: ui/events/event_processor.h

Issue 2712963003: mustash: Use ui::chromeos::EventRewriter in mus (Closed)
Patch Set: Fix build issues. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/BUILD.gn ('k') | ui/events/event_rewriter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ui/events/BUILD.gn ('k') | ui/events/event_rewriter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698