Index: ui/events/test/test_event_processor.h |
diff --git a/ui/events/test/test_event_processor.h b/ui/events/test/test_event_processor.h |
index 5d4d98a6d59c878a09104f35e9481ab966e456cf..4ac07b952f499b3a33020ccea73bd42e901a62c3 100644 |
--- a/ui/events/test/test_event_processor.h |
+++ b/ui/events/test/test_event_processor.h |
@@ -16,22 +16,35 @@ class TestEventProcessor : public EventProcessor { |
TestEventProcessor(); |
virtual ~TestEventProcessor(); |
+ int num_times_processing_started() const { |
+ return num_times_processing_started_; |
+ } |
+ |
int num_times_processing_finished() const { |
return num_times_processing_finished_; |
} |
void SetRoot(scoped_ptr<EventTarget> root); |
- void ResetCounts(); |
+ void SetShouldProcessingOccur(bool occur); |
+ void Reset(); |
// EventProcessor: |
virtual bool CanDispatchToTarget(EventTarget* target) OVERRIDE; |
virtual EventTarget* GetRootTarget() OVERRIDE; |
virtual EventDispatchDetails OnEventFromSource(Event* event) OVERRIDE; |
+ virtual void OnEventProcessingStarted(Event* event) OVERRIDE; |
virtual void OnEventProcessingFinished(Event* event) OVERRIDE; |
private: |
scoped_ptr<EventTarget> root_; |
+ // Used in our override of OnEventProcessingStarted(). If this value is |
+ // false, mark incoming events as handled. |
+ bool should_processing_occur_; |
+ |
+ // Counts the number of times OnEventProcessingStarted() has been called. |
+ int num_times_processing_started_; |
+ |
// Counts the number of times OnEventProcessingFinished() has been called. |
int num_times_processing_finished_; |