Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1301)

Unified Diff: ui/android/java/src/org/chromium/ui/AXNodeData.java

Issue 1073983005: Take a snapshot of the AXTree (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@assist-3
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/android/java/src/org/chromium/ui/AXNodeData.java
diff --git a/ui/android/java/src/org/chromium/ui/AXNodeData.java b/ui/android/java/src/org/chromium/ui/AXNodeData.java
new file mode 100644
index 0000000000000000000000000000000000000000..9030df4224dddc2ffbee81ed4868fe9769ad8d13
--- /dev/null
+++ b/ui/android/java/src/org/chromium/ui/AXNodeData.java
@@ -0,0 +1,37 @@
+// 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.ui;
+
+import java.util.ArrayList;
+
+/**
+ * A data struct to convey AXNodeData information to Java side.
dmazzoni 2015/04/10 19:20:00 I think we should convey how this differs from sim
sgurun-gerrit only 2015/04/10 23:24:50 That is a very clear description. Thanks!
+ */
+public class AXNodeData {
dmazzoni 2015/04/10 19:20:00 It feels like this is the wrong level of abstracti
sgurun-gerrit only 2015/04/10 23:24:50 Done.
+
+ public int id;
+ public int x, y, scrollX, scrollY, width, height;
+ public int childCount;
+ public String text;
+ public String className;
+ public ArrayList<AXNodeData> children = new ArrayList<AXNodeData>();
+
+ public AXNodeData(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(AXNodeData node) {
+ children.add(node);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698