Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / content / common / input / gesture_event_stream_validator.h
blob3c417f5d425f339cc1c71054b072f511a9e251e5
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
6 #define CONTENT_COMMON_INPUT_GESTURE_EVENT_STREAM_VALIDATOR
8 #include <string>
10 #include "base/basictypes.h"
12 namespace blink {
13 class WebGestureEvent;
16 namespace content {
18 // Utility class for validating a stream of WebGestureEvents.
19 class GestureEventStreamValidator {
20 public:
21 GestureEventStreamValidator();
22 ~GestureEventStreamValidator();
24 // If |event| is valid for the current stream, returns true.
25 // Otherwise, returns false with a corresponding error message.
26 bool Validate(const blink::WebGestureEvent& event, std::string* error_msg);
28 private:
29 bool scrolling_;
30 bool pinching_;
31 bool waiting_for_tap_end_;
33 DISALLOW_COPY_AND_ASSIGN(GestureEventStreamValidator);
36 } // namespace content
38 #endif // CONTENT_COMMON_INPUT_GESTURE_EVENT_STREAM_VALIDATOR