| Index: content/browser/renderer_host/input/synthetic_pointer_action_controller.h
|
| diff --git a/content/browser/renderer_host/input/synthetic_pointer_action_controller.h b/content/browser/renderer_host/input/synthetic_pointer_action_controller.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ddc588e8344662c01eec429745649097aa70fb33
|
| --- /dev/null
|
| +++ b/content/browser/renderer_host/input/synthetic_pointer_action_controller.h
|
| @@ -0,0 +1,51 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLLER_H_
|
| +#define CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLLER_H_
|
| +
|
| +#include "content/browser/renderer_host/input/synthetic_pointer.h"
|
| +#include "content/browser/renderer_host/input/synthetic_pointer_action.h"
|
| +#include "content/common/content_export.h"
|
| +#include "content/common/input/synthetic_pointer_action_params.h"
|
| +
|
| +namespace content {
|
| +
|
| +class CONTENT_EXPORT SyntheticPointerActionController {
|
| + public:
|
| + SyntheticPointerActionController();
|
| + ~SyntheticPointerActionController();
|
| +
|
| + std::unique_ptr<SyntheticGesture> CreateSyntheticPointerAction(
|
| + const SyntheticPointerActionParams& gesture_params);
|
| +
|
| + void ResetSyntheticPointer();
|
| +
|
| + void SetDefaultGestureSourceType(
|
| + SyntheticGestureParams::GestureSourceType default_type);
|
| +
|
| + private:
|
| + friend class TestSyntheticGestureController;
|
| +
|
| + void SetSyntheticPointer(const SyntheticPointerActionParams& gesture_params);
|
| +
|
| + // A list of all the action parameters, which should be executed in the
|
| + // same frame.
|
| + std::unique_ptr<std::vector<SyntheticPointerActionParams>> action_param_list_;
|
| + // For one pointer action sequence, we should use the same SyntheticPointer
|
| + // object, and keep the states for all touch points.
|
| + std::unique_ptr<SyntheticPointer> synthetic_pointer_;
|
| + // This is used to map the indexes of touch points between the ones that are
|
| + // part of the arguments to PointerAction API and the real indexes kept in
|
| + // the touch event we will dispatch to the renderer.
|
| + SyntheticPointerAction::IndexMap index_map_;
|
| +
|
| + SyntheticGestureParams::GestureSourceType default_type_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(SyntheticPointerActionController);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_BROWSER_RENDERER_HOST_INPUT_SYNTHETIC_POINTER_ACTION_CONTROLLER_H_
|
|
|