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

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 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 2015 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_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_H_
7
8 #include <memory>
9
10 #include "base/macros.h"
11 #include "content/common/content_export.h"
12 #include "content/common/input/synthetic_gesture_params.h"
13 #include "content/common/input/synthetic_pointer_action_params.h"
14 #include "content/common/input/synthetic_web_input_event_builders.h"
15
16 namespace content {
17
18 class SyntheticGestureTarget;
19
20 class CONTENT_EXPORT SyntheticPointerDriver {
21 public:
22 SyntheticPointerDriver();
23 virtual ~SyntheticPointerDriver();
24
25 static std::unique_ptr<SyntheticPointerDriver> Create(
26 SyntheticGestureParams::GestureSourceType gesture_source_type);
27
28 virtual void DispatchEvent(SyntheticGestureTarget* target,
29 const base::TimeTicks& timestamp) = 0;
30
31 virtual int Press(float x, float y) = 0;
32 virtual void Move(float x, float y, int index = 0) = 0;
33 virtual void Release(int index = 0) = 0;
34
35 // Check if the user inputs in the SyntheticPointerActionParams can generate
36 // a valid sequence of pointer actions.
37 virtual bool UserInputCheck(
38 const SyntheticPointerActionParams& params) const = 0;
39
40 protected:
41 static double ConvertTimestampToSeconds(const base::TimeTicks& timestamp);
42
43 private:
44 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerDriver);
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698