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

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

Issue 1884883005: Prepare SyntheticPointerAction to handle touch actions for multiple fingers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tests for mouse and change type of params_list Created 4 years, 6 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
(Empty)
1 // Copyright 2016 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_ACTION_CONTROLLER_ H_
6 #define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLLER_ H_
7
8 #include "content/browser/renderer_host/input/synthetic_pointer.h"
9 #include "content/browser/renderer_host/input/synthetic_pointer_action.h"
10 #include "content/common/content_export.h"
11 #include "content/common/input/synthetic_pointer_action_params.h"
12
13 namespace content {
14
15 class CONTENT_EXPORT SyntheticPointerActionController {
16 public:
17 SyntheticPointerActionController();
18 ~SyntheticPointerActionController();
19
20 std::unique_ptr<SyntheticGesture> CreateSyntheticPointerAction(
21 const SyntheticPointerActionParams& gesture_params);
22
23 void ResetSyntheticPointer();
24
25 void SetDefaultGestureSourceType(
26 SyntheticGestureParams::GestureSourceType default_type);
27
28 private:
29 friend class TestSyntheticGestureController;
30
31 void SetSyntheticPointer(const SyntheticPointerActionParams& gesture_params);
32
33 // A list of all the action parameters, which should be executed in the
34 // same frame.
35 std::unique_ptr<std::vector<SyntheticPointerActionParams>> action_param_list_;
36 // For one pointer action sequence, we should use the same SyntheticPointer
37 // object, and keep the states for all touch points.
38 std::unique_ptr<SyntheticPointer> synthetic_pointer_;
39 // This is used to map the indexes of touch points between the ones that are
40 // part of the arguments to PointerAction API and the real indexes kept in
41 // the touch event we will dispatch to the renderer.
42 SyntheticPointerAction::IndexMap index_map_;
43
44 SyntheticGestureParams::GestureSourceType default_type_;
45
46 DISALLOW_COPY_AND_ASSIGN(SyntheticPointerActionController);
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLL ER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698