Avi Drissman | 3e1a26c | 2022-09-15 20:26:03 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors |
Kevin Babbitt | a7d4818 | 2019-07-23 00:52:07 | [diff] [blame] | 2 | // 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 | |
| 11 | namespace ui { |
| 12 | |
| 13 | // A do-nothing action target. |
| 14 | class 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 Mazzoni | 988d387 | 2021-02-08 21:00:17 | [diff] [blame] | 22 | bool PerformAction(const AXActionData& action_data) const override; |
Kevin Babbitt | a7d4818 | 2019-07-23 00:52:07 | [diff] [blame] | 23 | gfx::Rect GetRelativeBounds() const override; |
| 24 | gfx::Point GetScrollOffset() const override; |
| 25 | gfx::Point MinimumScrollOffset() const override; |
| 26 | gfx::Point MaximumScrollOffset() const override; |
Kevin Babbitt | a7d4818 | 2019-07-23 00:52:07 | [diff] [blame] | 27 | void SetScrollOffset(const gfx::Point& point) const override; |
Kevin Babbitt | a7d4818 | 2019-07-23 00:52:07 | [diff] [blame] | 28 | bool SetSelection(const AXActionTarget* anchor_object, |
| 29 | int anchor_offset, |
| 30 | const AXActionTarget* focus_object, |
| 31 | int focus_offset) const override; |
Kevin Babbitt | a7d4818 | 2019-07-23 00:52:07 | [diff] [blame] | 32 | bool ScrollToMakeVisible() const override; |
| 33 | bool ScrollToMakeVisibleWithSubFocus( |
| 34 | const gfx::Rect& rect, |
| 35 | ax::mojom::ScrollAlignment horizontal_scroll_alignment, |
Martin Robinson | cf67a9cd | 2019-11-22 11:22:47 | [diff] [blame] | 36 | ax::mojom::ScrollAlignment vertical_scroll_alignment, |
| 37 | ax::mojom::ScrollBehavior scroll_behavior) const override; |
Kevin Babbitt | a7d4818 | 2019-07-23 00:52:07 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | } // namespace ui |
| 41 | |
| 42 | #endif // UI_ACCESSIBILITY_NULL_AX_ACTION_TARGET_H_ |