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

Unified Diff: chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc

Issue 2873373005: Add custom action support (Closed)
Patch Set: Rebase. Created 3 years, 7 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: chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
diff --git a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
index 83902e2143440414e08905ef049128757e5f2939..b3851e98a4877537a9ba8c33d259505e26ce033b 100644
--- a/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
+++ b/chrome/browser/chromeos/arc/accessibility/ax_tree_source_arc.cc
@@ -397,6 +397,19 @@ void AXTreeSourceArc::SerializeNode(mojom::AccessibilityNodeInfoData* node,
if (GetIntProperty(node, AXIntProperty::TEXT_SELECTION_END, &val) && val >= 0)
out_data->AddIntAttribute(ui::AX_ATTR_TEXT_SEL_END, val);
+
+ // TODO(yawano): Remove this. This is test code for WIP code.
+ std::vector<int32_t> custom_action_ids;
+ custom_action_ids.push_back(1);
+ custom_action_ids.push_back(2);
+ out_data->AddIntListAttribute(ui::AX_ATTR_CUSTOM_ACTION_IDS,
+ custom_action_ids);
+
+ std::vector<std::string> custom_action_descriptions;
+ custom_action_descriptions.push_back(std::string("Test action 1"));
+ custom_action_descriptions.push_back(std::string("Test action 2"));
+ out_data->AddStringListAttribute(ui::AX_ATTR_CUSTOM_ACTION_DESCRIPTIONS,
+ custom_action_descriptions);
}
void AXTreeSourceArc::PerformAction(const ui::AXActionData& data) {
« no previous file with comments | « no previous file | chrome/common/extensions/api/automation.idl » ('j') | chrome/common/extensions/api/automation.idl » ('J')

Powered by Google App Engine
This is Rietveld 408576698