#include "content/renderer/accessibility/ax_tree_snapshotter_impl.h"
#include "base/metrics/field_trial_params.h"
#include "base/metrics/histogram_functions.h"
#include "base/task/thread_pool.h"
#include "base/time/time.h"
#include "base/timer/elapsed_timer.h"
#include "content/renderer/render_frame_impl.h"
#include "third_party/blink/public/web/web_ax_context.h"
#include "third_party/blink/public/web/web_ax_object.h"
#include "third_party/blink/public/web/web_document.h"
#include "third_party/blink/public/web/web_frame.h"
#include "ui/accessibility/accessibility_features.h"
#include "ui/accessibility/ax_error_types.h"
#include "ui/accessibility/ax_tree_serializer.h"
#include "ui/accessibility/ax_tree_update.h"
WebAXContext;
WebAXObject;
WebDocument;
#define RECORD_ERROR(histogram) …
ErrorSet;
namespace content {
namespace {
constexpr int kMaxNodesHistogramLimit = …;
constexpr int kTimeoutInMillisecondsHistogramLimit = …;
}
constexpr char kAXTreeSnapshotterErrorHistogramName[] = …;
enum class AXTreeSnapshotErrorReason { … };
AXTreeSnapshotterImpl::AXTreeSnapshotterImpl(RenderFrameImpl* render_frame,
ui::AXMode ax_mode)
: … { … }
AXTreeSnapshotterImpl::~AXTreeSnapshotterImpl() = default;
void AXTreeSnapshotterImpl::Snapshot(size_t max_node_count,
base::TimeDelta timeout,
ui::AXTreeUpdate* response) { … }
bool AXTreeSnapshotterImpl::SerializeTreeWithLimits(
size_t max_node_count,
base::TimeDelta timeout,
ui::AXTreeUpdate* response) { … }
bool AXTreeSnapshotterImpl::SerializeTree(ui::AXTreeUpdate* response) { … }
}