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

Unified Diff: content/common/input/input_event_stream_validator.h

Issue 290473006: Add a TouchEventStreamValidator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 6 years, 7 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
Index: content/common/input/input_event_stream_validator.h
diff --git a/content/common/input/input_event_stream_validator.h b/content/common/input/input_event_stream_validator.h
index cbe122171113bb043c4a573d8a7e32e81dcbd749..cd9ab1de83eb77c34a9db246feee39d0fd565f52 100644
--- a/content/common/input/input_event_stream_validator.h
+++ b/content/common/input/input_event_stream_validator.h
@@ -5,7 +5,10 @@
#ifndef CONTENT_COMMON_INPUT_EVENT_STREAM_VALIDATOR
#define CONTENT_COMMON_INPUT_EVENT_STREAM_VALIDATOR
+#include <string>
+
#include "content/common/input/gesture_event_stream_validator.h"
+#include "content/common/input/touch_event_stream_validator.h"
namespace blink {
class WebInputEvent;
@@ -19,11 +22,16 @@ class InputEventStreamValidator {
public:
InputEventStreamValidator();
~InputEventStreamValidator();
- void OnEvent(const blink::WebInputEvent&);
+
+ void Validate(const blink::WebInputEvent&);
private:
+ bool ValidateImpl(const blink::WebInputEvent&, std::string* error_msg);
+
GestureEventStreamValidator gesture_validator_;
- bool enabled_;
+ TouchEventStreamValidator touch_validator_;
+ std::string error_msg_;
+ const bool enabled_;
DISALLOW_COPY_AND_ASSIGN(InputEventStreamValidator);
};

Powered by Google App Engine
This is Rietveld 408576698