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

Side by Side Diff: content/common/input/touch_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, 6 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CONTENT_COMMON_INPUT_TOUCH_EVENT_STREAM_VALIDATOR
6 #define CONTENT_COMMON_INPUT_TOUCH_EVENT_STREAM_VALIDATOR
7
8 #include <string>
9
10 #include "base/basictypes.h"
11 #include "third_party/WebKit/public/web/WebInputEvent.h"
12
13 namespace content {
14
15 // Utility class for validating a stream of WebTouchEvents.
16 class TouchEventStreamValidator {
17 public:
18 TouchEventStreamValidator();
19 ~TouchEventStreamValidator();
20
21 // If |event| is valid for the current stream, returns true.
22 // Otherwise, returns false with a corresponding error message.
23 bool Validate(const blink::WebTouchEvent& event, std::string* error_msg);
24
25 private:
26 blink::WebTouchEvent previous_event_;
27
28 DISALLOW_COPY_AND_ASSIGN(TouchEventStreamValidator);
29 };
30
31 } // namespace content
32
33 #endif // CONTENT_COMMON_INPUT_TOUCH_EVENT_STREAM_VALIDATOR
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698