#include "device/gamepad/abstract_haptic_gamepad.h"
#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "device/gamepad/gamepad_data_fetcher.h"
namespace device {
namespace {
constexpr double kMaxDurationMillis = …;
bool IsValidEffectType(mojom::GamepadHapticEffectType type) { … }
}
AbstractHapticGamepad::AbstractHapticGamepad() = default;
AbstractHapticGamepad::~AbstractHapticGamepad() { … }
void AbstractHapticGamepad::Shutdown() { … }
void AbstractHapticGamepad::SetZeroVibration() { … }
double AbstractHapticGamepad::GetMaxEffectDurationMillis() { … }
void AbstractHapticGamepad::PlayEffect(
mojom::GamepadHapticEffectType type,
mojom::GamepadEffectParametersPtr params,
mojom::GamepadHapticsManager::PlayVibrationEffectOnceCallback callback,
scoped_refptr<base::SequencedTaskRunner> callback_runner) { … }
void AbstractHapticGamepad::ResetVibration(
mojom::GamepadHapticsManager::ResetVibrationActuatorCallback callback,
scoped_refptr<base::SequencedTaskRunner> callback_runner) { … }
void AbstractHapticGamepad::PlayVibrationEffect(
int sequence_id,
mojom::GamepadEffectParametersPtr params) { … }
void AbstractHapticGamepad::StartVibration(
int sequence_id,
double duration,
mojom::GamepadEffectParametersPtr params) { … }
void AbstractHapticGamepad::FinishEffect(int sequence_id) { … }
}