1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_COMMON_INPUT_GESTURE_EVENT_STREAM_VALIDATOR_H_
6 #define CONTENT_COMMON_INPUT_GESTURE_EVENT_STREAM_VALIDATOR_H_
10 #include "base/basictypes.h"
11 #include "content/common/content_export.h"
14 class WebGestureEvent
;
19 // Utility class for validating a stream of WebGestureEvents.
20 class CONTENT_EXPORT GestureEventStreamValidator
{
22 GestureEventStreamValidator();
23 ~GestureEventStreamValidator();
25 // If |event| is valid for the current stream, returns true.
26 // Otherwise, returns false with a corresponding error message.
27 bool Validate(const blink::WebGestureEvent
& event
, std::string
* error_msg
);
32 bool waiting_for_tap_end_
;
34 DISALLOW_COPY_AND_ASSIGN(GestureEventStreamValidator
);
37 } // namespace content
39 #endif // CONTENT_COMMON_INPUT_GESTURE_EVENT_STREAM_VALIDATOR_H_