1 // Copyright 2019 The Chromium Authors. All rights reserved. 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; 22 bool ClearAccessibilityFocus() const override; 23 bool Click() const override; 24 bool Decrement() const override; 25 bool Increment() const override; 26 bool Focus() const override; 27 gfx::Rect GetRelativeBounds() const override; 28 gfx::Point GetScrollOffset() const override; 29 gfx::Point MinimumScrollOffset() const override; 30 gfx::Point MaximumScrollOffset() const override; 31 bool SetAccessibilityFocus() const override; 32 void SetScrollOffset(const gfx::Point& point) const override; 33 bool SetSelected(bool selected) const override; 34 bool SetSelection(const AXActionTarget* anchor_object, 35 int anchor_offset, 36 const AXActionTarget* focus_object, 37 int focus_offset) const override; 38 bool SetSequentialFocusNavigationStartingPoint() const override; 39 bool SetValue(const std::string& value) const override; 40 bool ShowContextMenu() const override; 41 bool ScrollToMakeVisible() const override; 42 bool ScrollToMakeVisibleWithSubFocus( 43 const gfx::Rect& rect, 44 ax::mojom::ScrollAlignment horizontal_scroll_alignment, 45 ax::mojom::ScrollAlignment vertical_scroll_alignment, 46 ax::mojom::ScrollBehavior scroll_behavior) const override; 47 bool ScrollToGlobalPoint(const gfx::Point& point) const override; 48 }; 49 50 } // namespace ui 51 52 #endif // UI_ACCESSIBILITY_NULL_AX_ACTION_TARGET_H_ 53