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

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

Issue 2634183002: Support multi-button press for synthetic mouse events (Closed)
Patch Set: button Created 3 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 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_DRIVER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_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"
(...skipping 10 matching lines...) Expand all
21 public: 21 public:
22 SyntheticPointerDriver(); 22 SyntheticPointerDriver();
23 virtual ~SyntheticPointerDriver(); 23 virtual ~SyntheticPointerDriver();
24 24
25 static std::unique_ptr<SyntheticPointerDriver> Create( 25 static std::unique_ptr<SyntheticPointerDriver> Create(
26 SyntheticGestureParams::GestureSourceType gesture_source_type); 26 SyntheticGestureParams::GestureSourceType gesture_source_type);
27 27
28 virtual void DispatchEvent(SyntheticGestureTarget* target, 28 virtual void DispatchEvent(SyntheticGestureTarget* target,
29 const base::TimeTicks& timestamp) = 0; 29 const base::TimeTicks& timestamp) = 0;
30 30
31 virtual void Press(float x, float y, int index = 0) = 0; 31 virtual void Press(float x,
32 float y,
33 int index = 0,
34 SyntheticPointerActionParams::Button button =
35 SyntheticPointerActionParams::Button::LEFT) = 0;
32 virtual void Move(float x, float y, int index = 0) = 0; 36 virtual void Move(float x, float y, int index = 0) = 0;
33 virtual void Release(int index = 0) = 0; 37 virtual void Release(int index = 0,
38 SyntheticPointerActionParams::Button button =
39 SyntheticPointerActionParams::Button::LEFT) = 0;
34 40
35 // Check if the user inputs in the SyntheticPointerActionParams can generate 41 // Check if the user inputs in the SyntheticPointerActionParams can generate
36 // a valid sequence of pointer actions. 42 // a valid sequence of pointer actions.
37 virtual bool UserInputCheck( 43 virtual bool UserInputCheck(
38 const SyntheticPointerActionParams& params) const = 0; 44 const SyntheticPointerActionParams& params) const = 0;
39 45
40 protected: 46 protected:
41 static double ConvertTimestampToSeconds(const base::TimeTicks& timestamp); 47 static double ConvertTimestampToSeconds(const base::TimeTicks& timestamp);
42 48
43 private: 49 private:
44 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerDriver); 50 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerDriver);
45 }; 51 };
46 52
47 } // namespace content 53 } // namespace content
48 54
49 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_H_ 55 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698