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

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

Issue 2478423002: Rename SyntheticPointer to SyntheticPointerDriver (Closed)
Patch Set: rename Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_POINTER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/input/synthetic_gesture_params.h" 12 #include "content/common/input/synthetic_gesture_params.h"
13 #include "content/common/input/synthetic_web_input_event_builders.h" 13 #include "content/common/input/synthetic_web_input_event_builders.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class SyntheticGestureTarget; 17 class SyntheticGestureTarget;
18 18
19 class CONTENT_EXPORT SyntheticPointer { 19 class CONTENT_EXPORT SyntheticPointerDriver {
20 public: 20 public:
21 SyntheticPointer(); 21 SyntheticPointerDriver();
22 virtual ~SyntheticPointer(); 22 virtual ~SyntheticPointerDriver();
23 23
24 static std::unique_ptr<SyntheticPointer> Create( 24 static std::unique_ptr<SyntheticPointerDriver> Create(
25 SyntheticGestureParams::GestureSourceType gesture_source_type); 25 SyntheticGestureParams::GestureSourceType gesture_source_type);
26 26
27 virtual void DispatchEvent(SyntheticGestureTarget* target, 27 virtual void DispatchEvent(SyntheticGestureTarget* target,
28 const base::TimeTicks& timestamp) = 0; 28 const base::TimeTicks& timestamp) = 0;
29 29
30 virtual int Press(float x, 30 virtual int Press(int index,
tdresser 2016/11/07 17:44:11 Why do we need to pass index now? If we do, why d
lanwei 2016/11/07 23:28:48 I added the index because we keep index_map_ in Sy
31 float x,
31 float y, 32 float y,
32 SyntheticGestureTarget* target, 33 SyntheticGestureTarget* target,
33 const base::TimeTicks& timestamp) = 0; 34 const base::TimeTicks& timestamp) = 0;
34 virtual void Move(int index, 35 virtual void Move(int index,
35 float x, 36 float x,
36 float y, 37 float y,
37 SyntheticGestureTarget* target, 38 SyntheticGestureTarget* target,
38 const base::TimeTicks& timestamp) = 0; 39 const base::TimeTicks& timestamp) = 0;
39 virtual void Release(int index, 40 virtual void Release(int index,
40 SyntheticGestureTarget* target, 41 SyntheticGestureTarget* target,
41 const base::TimeTicks& timestamp) = 0; 42 const base::TimeTicks& timestamp) = 0;
42 43
43 virtual SyntheticGestureParams::GestureSourceType SourceType() const = 0; 44 virtual SyntheticGestureParams::GestureSourceType SourceType() const = 0;
44 45
46 virtual int GetPointIndex(int index) const = 0;
47
45 protected: 48 protected:
46 static double ConvertTimestampToSeconds(const base::TimeTicks& timestamp); 49 static double ConvertTimestampToSeconds(const base::TimeTicks& timestamp);
47 50
48 private: 51 private:
49 DISALLOW_COPY_AND_ASSIGN(SyntheticPointer); 52 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerDriver);
50 }; 53 };
51 54
52 } // namespace content 55 } // namespace content
53 56
54 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_H_ 57 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698