#ifndef SERVICES_ACCESSIBILITY_AUTOMATION_IMPL_H_
#define SERVICES_ACCESSIBILITY_AUTOMATION_IMPL_H_
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/bindings/remote_set.h"
#include "services/accessibility/public/mojom/automation.mojom.h"
#include "services/accessibility/public/mojom/automation_client.mojom.h"
#include "ui/accessibility/ax_event.h"
#include "ui/accessibility/ax_node_id_forward.h"
#include "ui/accessibility/ax_relative_bounds.h"
#include "ui/accessibility/ax_tree_id.h"
#include "ui/accessibility/ax_tree_update.h"
namespace ax {
class AutomationImpl : public mojom::Automation {
public:
AutomationImpl();
~AutomationImpl() override;
AutomationImpl(const AutomationImpl&) = delete;
AutomationImpl& operator=(const AutomationImpl&) = delete;
void Bind(
mojo::PendingRemote<mojom::AutomationClient> automation_client_remote,
mojo::PendingReceiver<mojom::Automation> automation_receiver);
private:
void DispatchTreeDestroyedEvent(const ui::AXTreeID& tree_id) override;
void DispatchActionResult(const ui::AXActionData& data, bool result) override;
void DispatchAccessibilityEvents(
const ui::AXTreeID& tree_id,
const std::vector<ui::AXTreeUpdate>& updates,
const gfx::Point& mouse_location,
const std::vector<ui::AXEvent>& events) override;
void DispatchAccessibilityLocationChange(
const ui::AXTreeID& tree_id,
int node_id,
const ui::AXRelativeBounds& bounds) override;
void DispatchAccessibilityScrollChange(const ui::AXTreeID& tree_id,
int node_id,
int scroll_x,
int scroll_y) override;
mojo::ReceiverSet<mojom::Automation> automation_receivers_;
mojo::RemoteSet<mojom::AutomationClient> automation_client_remotes_;
};
}
#endif