blob: 03600146e35c8bb4030b7601ebe9b021cb97eebd [file] [log] [blame]
Avi Drissman3e1a26c2022-09-15 20:26:031// Copyright 2019 The Chromium Authors
Kevin Babbitta7d48182019-07-23 00:52:072// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef UI_ACCESSIBILITY_NULL_AX_ACTION_TARGET_H_
6#define UI_ACCESSIBILITY_NULL_AX_ACTION_TARGET_H_
7
8#include "ui/accessibility/ax_action_target.h"
9#include "ui/accessibility/ax_export.h"
10
11namespace ui {
12
13// A do-nothing action target.
14class AX_EXPORT NullAXActionTarget : public AXActionTarget {
15 public:
16 NullAXActionTarget() = default;
17 ~NullAXActionTarget() override = default;
18
19 protected:
20 // AXActionTarget overrides.
21 Type GetType() const override;
Dominic Mazzoni988d3872021-02-08 21:00:1722 bool PerformAction(const AXActionData& action_data) const override;
Kevin Babbitta7d48182019-07-23 00:52:0723 gfx::Rect GetRelativeBounds() const override;
24 gfx::Point GetScrollOffset() const override;
25 gfx::Point MinimumScrollOffset() const override;
26 gfx::Point MaximumScrollOffset() const override;
Kevin Babbitta7d48182019-07-23 00:52:0727 void SetScrollOffset(const gfx::Point& point) const override;
Kevin Babbitta7d48182019-07-23 00:52:0728 bool SetSelection(const AXActionTarget* anchor_object,
29 int anchor_offset,
30 const AXActionTarget* focus_object,
31 int focus_offset) const override;
Kevin Babbitta7d48182019-07-23 00:52:0732 bool ScrollToMakeVisible() const override;
33 bool ScrollToMakeVisibleWithSubFocus(
34 const gfx::Rect& rect,
35 ax::mojom::ScrollAlignment horizontal_scroll_alignment,
Martin Robinsoncf67a9cd2019-11-22 11:22:4736 ax::mojom::ScrollAlignment vertical_scroll_alignment,
37 ax::mojom::ScrollBehavior scroll_behavior) const override;
Kevin Babbitta7d48182019-07-23 00:52:0738};
39
40} // namespace ui
41
42#endif // UI_ACCESSIBILITY_NULL_AX_ACTION_TARGET_H_