Add ICU message format support
[chromium-blink-merge.git] / content / browser / renderer_host / input / synthetic_tap_gesture.h
bloba42b2dd17edf12fbe005d25c51ce992be97e9678
1 // Copyright 2013 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_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TAP_GESTURE_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TAP_GESTURE_H_
8 #include "content/browser/renderer_host/input/synthetic_gesture.h"
9 #include "content/browser/renderer_host/input/synthetic_gesture_target.h"
10 #include "content/common/content_export.h"
11 #include "content/common/input/synthetic_tap_gesture_params.h"
12 #include "content/common/input/synthetic_web_input_event_builders.h"
14 namespace content {
16 class CONTENT_EXPORT SyntheticTapGesture : public SyntheticGesture {
17 public:
18 explicit SyntheticTapGesture(const SyntheticTapGestureParams& params);
19 ~SyntheticTapGesture() override;
21 SyntheticGesture::Result ForwardInputEvents(
22 const base::TimeTicks& timestamp,
23 SyntheticGestureTarget* target) override;
25 private:
26 enum GestureState {
27 SETUP,
28 PRESS,
29 WAITING_TO_RELEASE,
30 DONE
33 void ForwardTouchOrMouseInputEvents(const base::TimeTicks& timestamp,
34 SyntheticGestureTarget* target);
36 void Press(SyntheticGestureTarget* target, const base::TimeTicks& timestamp);
37 void Release(SyntheticGestureTarget* target,
38 const base::TimeTicks& timestamp);
40 base::TimeDelta GetDuration() const;
42 SyntheticTapGestureParams params_;
43 base::TimeTicks start_time_;
44 SyntheticWebTouchEvent touch_event_;
45 SyntheticGestureParams::GestureSourceType gesture_source_type_;
46 GestureState state_;
48 DISALLOW_COPY_AND_ASSIGN(SyntheticTapGesture);
51 } // namespace content
53 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_TAP_GESTURE_H_