#include "third_party/blink/renderer/modules/gamepad/gamepad_dispatcher.h"
#include <utility>
#include "device/gamepad/public/cpp/gamepads.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/gamepad/gamepad_shared_memory_reader.h"
#include "third_party/blink/renderer/modules/gamepad/navigator_gamepad.h"
namespace blink {
GamepadHapticsManager;
void GamepadDispatcher::SampleGamepads(device::Gamepads& gamepads) { … }
void GamepadDispatcher::PlayVibrationEffectOnce(
uint32_t pad_index,
device::mojom::blink::GamepadHapticEffectType type,
device::mojom::blink::GamepadEffectParametersPtr params,
GamepadHapticsManager::PlayVibrationEffectOnceCallback callback) { … }
void GamepadDispatcher::ResetVibrationActuator(
uint32_t pad_index,
GamepadHapticsManager::ResetVibrationActuatorCallback callback) { … }
GamepadDispatcher::GamepadDispatcher(ExecutionContext& context)
: … { … }
GamepadDispatcher::~GamepadDispatcher() = default;
void GamepadDispatcher::InitializeHaptics() { … }
void GamepadDispatcher::Trace(Visitor* visitor) const { … }
void GamepadDispatcher::DidConnectGamepad(uint32_t index,
const device::Gamepad& gamepad) { … }
void GamepadDispatcher::DidDisconnectGamepad(uint32_t index,
const device::Gamepad& gamepad) { … }
void GamepadDispatcher::ButtonOrAxisDidChange(uint32_t index,
const device::Gamepad& gamepad) { … }
void GamepadDispatcher::DispatchDidConnectOrDisconnectGamepad(
uint32_t index,
const device::Gamepad& gamepad,
bool connected) { … }
void GamepadDispatcher::StartListening(LocalDOMWindow* window) { … }
void GamepadDispatcher::StopListening() { … }
}