5#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_TESTS_FAKES_TOUCH_SOURCE_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_TESTS_FAKES_TOUCH_SOURCE_H_
8#include <fuchsia/ui/pointer/cpp/fidl.h>
13#include "flutter/fml/logging.h"
22 void Watch(std::vector<fuchsia::ui::pointer::TouchResponse> responses,
23 TouchSource::WatchCallback
callback)
override {
24 responses_ = std::move(responses);
30 FML_CHECK(callback_) <<
"require a valid WatchCallback";
31 callback_(std::move(events));
35 std::optional<std::vector<fuchsia::ui::pointer::TouchResponse>>
37 auto responses = std::move(responses_);
44 void UpdateResponse(fuchsia::ui::pointer::TouchInteractionId ixn,
45 fuchsia::ui::pointer::TouchResponse response,
46 TouchSource::UpdateResponseCallback
callback)
override {
51 std::optional<std::vector<fuchsia::ui::pointer::TouchResponse>> responses_;
55 TouchSource::WatchCallback callback_;
void ScheduleCallback(std::vector< fuchsia::ui::pointer::TouchEvent > events)
std::optional< std::vector< fuchsia::ui::pointer::TouchResponse > > UploadedResponses()
void Watch(std::vector< fuchsia::ui::pointer::TouchResponse > responses, TouchSource::WatchCallback callback) override
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
#define FML_CHECK(condition)
#define FML_UNREACHABLE()