chromium/ui/views/accessibility/ax_virtual_view.cc

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/views/accessibility/ax_virtual_view.h"

#include <stdint.h>

#include <algorithm>
#include <map>
#include <utility>

#include "base/containers/adapters.h"
#include "base/functional/callback.h"
#include "base/no_destructor.h"
#include "base/ranges/algorithm.h"
#include "build/build_config.h"
#include "ui/accessibility/ax_action_data.h"
#include "ui/accessibility/ax_role_properties.h"
#include "ui/accessibility/ax_tree_data.h"
#include "ui/accessibility/platform/ax_platform_node.h"
#include "ui/base/layout.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/geometry/rect_conversions.h"
#include "ui/views/accessibility/ax_event_manager.h"
#include "ui/views/accessibility/view_accessibility.h"
#include "ui/views/accessibility/view_ax_platform_node_delegate.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"

#if BUILDFLAG(IS_WIN)
#include "ui/views/win/hwnd_util.h"
#endif

namespace views {

// Tracks all virtual ax views.
std::map<int32_t, AXVirtualView*>& GetIdMap() {}

// static
const char AXVirtualView::kViewClassName[] =;

// static
AXVirtualView* AXVirtualView::GetFromId(int32_t id) {}

AXVirtualView::AXVirtualView() {}

AXVirtualView::~AXVirtualView() {}

void AXVirtualView::AddChildView(std::unique_ptr<AXVirtualView> view) {}

void AXVirtualView::AddChildViewAt(std::unique_ptr<AXVirtualView> view,
                                   size_t index) {}

void AXVirtualView::ReorderChildView(AXVirtualView* view, size_t index) {}

std::unique_ptr<AXVirtualView> AXVirtualView::RemoveFromParentView() {}

std::unique_ptr<AXVirtualView> AXVirtualView::RemoveChildView(
    AXVirtualView* view) {}

void AXVirtualView::RemoveAllChildViews() {}

bool AXVirtualView::Contains(const AXVirtualView* view) const {}

std::optional<size_t> AXVirtualView::GetIndexOf(
    const AXVirtualView* view) const {}

const char* AXVirtualView::GetViewClassName() const {}

gfx::NativeViewAccessible AXVirtualView::GetNativeObject() const {}

void AXVirtualView::NotifyAccessibilityEvent(ax::mojom::Event event_type) {}

ui::AXNodeData& AXVirtualView::GetCustomData() {}

void AXVirtualView::SetPopulateDataCallback(
    base::RepeatingCallback<void(ui::AXNodeData*)> callback) {}

void AXVirtualView::UnsetPopulateDataCallback() {}

// ui::AXPlatformNodeDelegate

const ui::AXNodeData& AXVirtualView::GetData() const {}

size_t AXVirtualView::GetChildCount() const {}

gfx::NativeViewAccessible AXVirtualView::ChildAtIndex(size_t index) const {}

#if !BUILDFLAG(IS_MAC)
gfx::NativeViewAccessible AXVirtualView::GetNSWindow() {}
#endif

gfx::NativeViewAccessible AXVirtualView::GetNativeViewAccessible() {}

gfx::NativeViewAccessible AXVirtualView::GetParent() const {}

gfx::Rect AXVirtualView::GetBoundsRect(
    const ui::AXCoordinateSystem coordinate_system,
    const ui::AXClippingBehavior clipping_behavior,
    ui::AXOffscreenResult* offscreen_result) const {}

gfx::NativeViewAccessible AXVirtualView::HitTestSync(
    int screen_physical_pixel_x,
    int screen_physical_pixel_y) const {}

gfx::NativeViewAccessible AXVirtualView::GetFocus() const {}

ui::AXPlatformNode* AXVirtualView::GetFromNodeID(int32_t id) {}

bool AXVirtualView::AccessibilityPerformAction(const ui::AXActionData& data) {}

bool AXVirtualView::ShouldIgnoreHoveredStateForTesting() {}

bool AXVirtualView::IsOffscreen() const {}

ui::AXPlatformNodeId AXVirtualView::GetUniqueId() const {}

// Virtual views need to implement this function in order for accessibility
// events to be routed correctly.
gfx::AcceleratedWidget AXVirtualView::GetTargetForNativeAccessibilityEvent() {}

std::vector<int32_t> AXVirtualView::GetColHeaderNodeIds() const {}

std::vector<int32_t> AXVirtualView::GetColHeaderNodeIds(int col_index) const {}

std::optional<int32_t> AXVirtualView::GetCellId(int row_index,
                                                int col_index) const {}

bool AXVirtualView::HandleAccessibleAction(
    const ui::AXActionData& action_data) {}

bool AXVirtualView::HandleAccessibleActionInOwnerView(
    const ui::AXActionData& action_data) {}

void AXVirtualView::set_cache(AXAuraObjCache* cache) {}

View* AXVirtualView::GetOwnerView() const {}

ViewAXPlatformNodeDelegate* AXVirtualView::GetDelegate() const {}

AXVirtualViewWrapper* AXVirtualView::GetOrCreateWrapper(
    views::AXAuraObjCache* cache) {}

void AXVirtualView::PruneVirtualSubtree() {}

void AXVirtualView::UnpruneVirtualSubtree() {}
}  // namespace views