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

Unified Diff: ui/events/test/test_event_processor.h

Issue 552503003: Introduce EventProcessor::OnEventProcessingStarted() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sadrul comments addressed Created 6 years, 3 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/event_processor_unittest.cc ('k') | ui/events/test/test_event_processor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5b9a99b27780eb9d57d68f77bd6c42b0b64dc0ba 100644
--- a/ui/events/test/test_event_processor.h
+++ b/ui/events/test/test_event_processor.h
@@ -16,22 +16,38 @@ 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 set_should_processing_occur(bool occur) {
+ should_processing_occur_ = occur;
+ }
+
void SetRoot(scoped_ptr<EventTarget> root);
- void ResetCounts();
+ 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_;
« no previous file with comments | « ui/events/event_processor_unittest.cc ('k') | ui/events/test/test_event_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698