OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_COMMON_AX_TREE_H_ |
| 6 #define CONTENT_PUBLIC_COMMON_AX_TREE_H_ |
| 7 |
| 8 #include "content/common/content_export.h" |
| 9 #include "content/public/common/ax_node.h" |
| 10 #include "content/public/common/ax_tree_update.h" |
| 11 |
| 12 namespace content { |
| 13 |
| 14 // AXTree is a live, managed tree of AXNode objects that can receive |
| 15 // updates from another tree via AXTreeUpdates. |
| 16 class CONTENT_EXPORT AXTree { |
| 17 public: |
| 18 static AXTree* Create(const AXTreeUpdate& initial_state); |
| 19 |
| 20 virtual AXNode* GetRoot() const = 0; |
| 21 virtual AXNode* GetFromId(int32 id) const = 0; |
| 22 |
| 23 // Apply an update from another tree. |
| 24 virtual bool Unserialize(const AXTreeUpdate& update) = 0; |
| 25 |
| 26 protected: |
| 27 AXTree(); |
| 28 virtual ~AXTree(); |
| 29 }; |
| 30 |
| 31 } // namespace content |
| 32 |
| 33 #endif // CONTENT_PUBLIC_COMMON_AX_TREE_H_ |
OLD | NEW |