19 #ifndef MIR_INPUT_ANDROID_REGISTRAR_H_
20 #define MIR_INPUT_ANDROID_REGISTRAR_H_
26 #include <utils/StrongPointer.h>
33 class InputDispatcherInterface;
34 class InputWindowHandle;
37 namespace droidinput = android;
46 class InputConfiguration;
49 class InputRegistrar :
public surfaces::InputRegistrar,
public WindowHandleRepository
52 explicit InputRegistrar(droidinput::sp<droidinput::InputDispatcherInterface>
const& input_dispatcher);
55 void input_channel_opened(std::shared_ptr<input::InputChannel> const& opened_channel,
56 std::shared_ptr<input::Surface> const& surface,
59 void input_channel_closed(std::shared_ptr<input::InputChannel> const& closed_channel);
62 virtual droidinput::sp<droidinput::InputWindowHandle> handle_for_channel(std::shared_ptr<input::InputChannel const> const& channel);
65 droidinput::sp<droidinput::InputDispatcherInterface> const input_dispatcher;
67 std::map<std::shared_ptr<input::InputChannel const>, droidinput::sp<droidinput::InputWindowHandle>> window_handles;
69 std::mutex handles_mutex;
76 #endif // MIR_INPUT_ANDROID_REGISTRAR_H_