1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
content / common / input / synthetic_gesture.cc [blame]
// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/common/input/synthetic_gesture.h"
#include "base/notreached.h"
#include "content/common/input/synthetic_gesture_target.h"
namespace content {
SyntheticGesture::SyntheticGesture(
std::unique_ptr<SyntheticGestureParams> params)
: params_(std::move(params)) {}
SyntheticGesture::~SyntheticGesture() {}
bool SyntheticGesture::AllowHighFrequencyDispatch() const {
return true;
}
void SyntheticGesture::WaitForTargetAck(base::OnceClosure callback,
SyntheticGestureTarget* target) const {
std::move(callback).Run();
}
void SyntheticGesture::DidQueue(
base::WeakPtr<SyntheticGestureController> controller) {
CHECK(controller);
dispatching_controller_ = controller;
}
bool SyntheticGesture::IsFromDevToolsDebugger() const {
return params_->from_devtools_debugger;
}
float SyntheticGesture::GetVsyncOffsetMs() const {
return params_->vsync_offset_ms;
}
content::mojom::InputEventPattern SyntheticGesture::InputEventPattern() const {
return params_->input_event_pattern;
}
} // namespace content