blob: 4f7fb59122ac2200583fe7c42fbf0a6863fb5b4b [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_RENDERER_ACCESSIBILITY_AX_TREE_SNAPSHOTTER_IMPL_H_
#define CONTENT_RENDERER_ACCESSIBILITY_AX_TREE_SNAPSHOTTER_IMPL_H_
#include "content/public/renderer/render_frame.h"
#include "ui/accessibility/ax_tree_update_forward.h"
namespace blink {
class WebAXContext;
}
namespace content {
class RenderFrameImpl;
class AXTreeSnapshotterImpl : public AXTreeSnapshotter {
public:
explicit AXTreeSnapshotterImpl(RenderFrameImpl* render_frame);
~AXTreeSnapshotterImpl() override;
// AXTreeSnapshotter implementation.
void Snapshot(ui::AXMode ax_mode,
size_t max_node_count,
ui::AXTreeUpdate* accessibility_tree) override;
private:
RenderFrameImpl* render_frame_;
std::unique_ptr<blink::WebAXContext> context_;
AXTreeSnapshotterImpl(const AXTreeSnapshotterImpl&) = delete;
AXTreeSnapshotterImpl& operator=(const AXTreeSnapshotterImpl&) = delete;
};
} // namespace content
#endif // CONTENT_RENDERER_ACCESSIBILITY_AX_TREE_SNAPSHOTTER_IMPL_H_