Add ICU message format support
[chromium-blink-merge.git] / content / common / ax_content_node_data.h
blob84411733d656f8b24a777366a8f85be94c72ad4e
1 // Copyright 2015 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.
5 #ifndef CONTENT_COMMON_AX_CONTENT_NODE_DATA_H_
6 #define CONTENT_COMMON_AX_CONTENT_NODE_DATA_H_
8 #include "content/common/content_export.h"
9 #include "ui/accessibility/ax_node_data.h"
11 namespace content {
13 enum AXContentIntAttribute {
14 // The routing ID of this root node.
15 AX_CONTENT_ATTR_ROUTING_ID,
17 // The routing ID of this tree's parent.
18 AX_CONTENT_ATTR_PARENT_ROUTING_ID,
20 // The routing ID of this node's child tree.
21 AX_CONTENT_ATTR_CHILD_ROUTING_ID,
23 // The browser plugin instance ID of this node's child tree.
24 AX_CONTENT_ATTR_CHILD_BROWSER_PLUGIN_INSTANCE_ID,
26 AX_CONTENT_INT_ATTRIBUTE_LAST
29 // A subclass of AXNodeData that contains extra fields for
30 // content-layer-specific AX attributes.
31 struct CONTENT_EXPORT AXContentNodeData : public ui::AXNodeData {
32 AXContentNodeData();
33 ~AXContentNodeData() override;
35 bool HasContentIntAttribute(AXContentIntAttribute attribute) const;
36 int GetContentIntAttribute(AXContentIntAttribute attribute) const;
37 bool GetContentIntAttribute(AXContentIntAttribute attribute,
38 int* value) const;
39 void AddContentIntAttribute(AXContentIntAttribute attribute, int value);
41 // Return a string representation of this data, for debugging.
42 std::string ToString() const override;
44 // This is a simple serializable struct. All member variables should be
45 // public and copyable.
46 std::vector<std::pair<AXContentIntAttribute, int32> > content_int_attributes;
49 } // namespace content
51 #endif // CONTENT_COMMON_AX_CONTENT_NODE_DATA_H_