blob: d9ee995bd1159e0433d5fc809f6a45f60303c1ba [file] [log] [blame]
// Copyright 2018 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.
#include "ui/accessibility/ax_tree_update.h"
#include "ui/accessibility/mojom/ax_node_data_mojom_traits.h"
#include "ui/accessibility/mojom/ax_tree_data_mojom_traits.h"
#include "ui/accessibility/mojom/ax_tree_update.mojom-shared.h"
namespace mojo {
template <>
struct StructTraits<ax::mojom::AXTreeUpdateDataView, ui::AXTreeUpdate> {
static bool has_tree_data(const ui::AXTreeUpdate& p) {
return p.has_tree_data;
static ui::AXTreeData tree_data(const ui::AXTreeUpdate& p) {
return p.tree_data;
static int32_t node_id_to_clear(const ui::AXTreeUpdate& p) {
return p.node_id_to_clear;
static int32_t root_id(const ui::AXTreeUpdate& p) { return p.root_id; }
static std::vector<ui::AXNodeData> nodes(const ui::AXTreeUpdate& p) {
return p.nodes;
static ax::mojom::EventFrom event_from(const ui::AXTreeUpdate& p) {
return p.event_from;
static bool Read(ax::mojom::AXTreeUpdateDataView data, ui::AXTreeUpdate* out);
} // namespace mojo