Add ICU message format support
[chromium-blink-merge.git] / content / common / input / input_event_stream_validator.h
blob60435b7805909f0e11f2b5833ec57c9caa055a71
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_INPUT_EVENT_STREAM_VALIDATOR_H_
6 #define CONTENT_COMMON_INPUT_INPUT_EVENT_STREAM_VALIDATOR_H_
8 #include <string>
10 #include "content/common/input/gesture_event_stream_validator.h"
11 #include "content/common/input/touch_event_stream_validator.h"
13 namespace blink {
14 class WebInputEvent;
17 namespace content {
19 // DCHECKs that the stream of WebInputEvents passed to OnEvent is
20 // valid. Currently only validates touch and touchscreen gesture events.
21 class InputEventStreamValidator {
22 public:
23 InputEventStreamValidator();
24 ~InputEventStreamValidator();
26 void Validate(const blink::WebInputEvent&);
28 private:
29 bool ValidateImpl(const blink::WebInputEvent&, std::string* error_msg);
31 GestureEventStreamValidator gesture_validator_;
32 TouchEventStreamValidator touch_validator_;
33 std::string error_msg_;
34 const bool enabled_;
36 DISALLOW_COPY_AND_ASSIGN(InputEventStreamValidator);
39 } // namespace content
41 #endif // CONTENT_COMMON_INPUT_INPUT_EVENT_STREAM_VALIDATOR_H_