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

Side by Side Diff: content/browser/renderer_host/input/synthetic_gesture_target.h

Issue 134123003: Generate proper LatencyInfo components for synthetic gestures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove InputEvent forward decl Created 6 years, 11 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_
7 7
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/browser/renderer_host/input/synthetic_gesture.h" 9 #include "content/browser/renderer_host/input/synthetic_gesture.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/common/input/synthetic_gesture_params.h" 11 #include "content/common/input/synthetic_gesture_params.h"
12 12
13 namespace blink {
14 class WebInputEvent;
15 }
16
13 namespace content { 17 namespace content {
14 18
15 class InputEvent;
16
17 // Interface between the synthetic gesture controller and the RenderWidgetHost. 19 // Interface between the synthetic gesture controller and the RenderWidgetHost.
18 class CONTENT_EXPORT SyntheticGestureTarget { 20 class CONTENT_EXPORT SyntheticGestureTarget {
19 public: 21 public:
20 SyntheticGestureTarget() {} 22 SyntheticGestureTarget() {}
21 virtual ~SyntheticGestureTarget() {} 23 virtual ~SyntheticGestureTarget() {}
22 24
23 // Allows synthetic gestures to insert input events in the highest level of 25 // Allows synthetic gestures to insert input events in the highest level of
24 // input processing on the target platform (e.g. Java on Android), so that 26 // input processing on the target platform (e.g. Java on Android), so that
25 // the event traverses the entire input processing stack. 27 // the event traverses the entire input processing stack.
26 virtual void DispatchInputEventToPlatform(const InputEvent& event) = 0; 28 virtual void DispatchInputEventToPlatform(
29 const blink::WebInputEvent& event) = 0;
27 30
28 // Called by SyntheticGestureController when a gesture has finished. 31 // Called by SyntheticGestureController when a gesture has finished.
29 virtual void OnSyntheticGestureCompleted( 32 virtual void OnSyntheticGestureCompleted(
30 SyntheticGesture::Result result) = 0; 33 SyntheticGesture::Result result) = 0;
31 34
32 // Called by SyntheticGestureController to request a flush at a time 35 // Called by SyntheticGestureController to request a flush at a time
33 // appropriate for the platform, e.g. aligned with vsync. 36 // appropriate for the platform, e.g. aligned with vsync.
34 virtual void SetNeedsFlush() = 0; 37 virtual void SetNeedsFlush() = 0;
35 38
36 // Returns the default gesture source type for the target. 39 // Returns the default gesture source type for the target.
37 virtual SyntheticGestureParams::GestureSourceType 40 virtual SyntheticGestureParams::GestureSourceType
38 GetDefaultSyntheticGestureSourceType() const = 0; 41 GetDefaultSyntheticGestureSourceType() const = 0;
39 42
40 // Check if a particular gesture type is supported by the target. 43 // Check if a particular gesture type is supported by the target.
41 virtual bool SupportsSyntheticGestureSourceType( 44 virtual bool SupportsSyntheticGestureSourceType(
42 SyntheticGestureParams::GestureSourceType gesture_source_type) const = 0; 45 SyntheticGestureParams::GestureSourceType gesture_source_type) const = 0;
43 46
44 // After how much time of inaction does the target assume that a pointer has 47 // After how much time of inaction does the target assume that a pointer has
45 // stopped moving. 48 // stopped moving.
46 virtual base::TimeDelta PointerAssumedStoppedTime() const = 0; 49 virtual base::TimeDelta PointerAssumedStoppedTime() const = 0;
47 50
48 // Returns the maximum number of DIPs a touch pointer can move without being 51 // Returns the maximum number of DIPs a touch pointer can move without being
49 // considered moving by the platform. 52 // considered moving by the platform.
50 virtual int GetTouchSlopInDips() const = 0; 53 virtual int GetTouchSlopInDips() const = 0;
51 }; 54 };
52 55
53 } // namespace content 56 } // namespace content
54 57
55 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_ 58 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_GESTURE_TARGET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698