Index: content/public/android/java/src/org/chromium/content_public/browser/AccessibilitySnapshotNode.java |
diff --git a/content/public/android/java/src/org/chromium/content_public/browser/AccessibilitySnapshotNode.java b/content/public/android/java/src/org/chromium/content_public/browser/AccessibilitySnapshotNode.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..89b3685ad433e2489652266032b5e6acaaec22d1 |
--- /dev/null |
+++ b/content/public/android/java/src/org/chromium/content_public/browser/AccessibilitySnapshotNode.java |
@@ -0,0 +1,41 @@ |
+// Copyright 2015 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. |
+ |
+package org.chromium.content_public.browser; |
+ |
+import java.util.ArrayList; |
+ |
+/** |
+ * A light-weight data structure to encode key information from the accessibility |
+ * tree for operations that need a quick snapshot of the web content. This is different |
+ * from BrowserAccessibilityManager.java, which maintains a persistent Android |
+ * accessibility tree that can be queried synchronously by the Android framework. |
+ */ |
+public class AccessibilitySnapshotNode { |
+ |
+ public int id; |
dmazzoni
2015/04/13 06:55:44
Let's delete "id" unless you have a really good re
sgurun-gerrit only
2015/04/14 00:27:12
not used. Done.
|
+ public int x, y, scrollX, scrollY, width, height; |
+ public int childCount; |
dmazzoni
2015/04/13 06:55:44
Any reason for this over children.size()?
sgurun-gerrit only
2015/04/14 00:27:12
it is not used actually. Thanks for catching it!
|
+ public String text; |
+ public String className; |
+ public ArrayList<AccessibilitySnapshotNode> children = |
+ new ArrayList<AccessibilitySnapshotNode>(); |
+ |
+ public AccessibilitySnapshotNode(int id, int x, int y, int scrollX, int scrollY, int width, |
+ int height, String text, String className) { |
+ this.id = id; |
+ this.x = x; |
+ this.y = y; |
+ this.scrollX = scrollX; |
+ this.scrollY = scrollY; |
+ this.width = width; |
+ this.height = height; |
+ this.text = text; |
+ this.className = className; |
+ } |
+ |
+ public void addChild(AccessibilitySnapshotNode node) { |
+ children.add(node); |
+ } |
+} |