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

Unified Diff: chrome/browser/extensions/api/automation_internal/automation_action_adapter.h

Issue 2410333005: Create AXAction and AXActionData as a way to simplify accessibility actions (Closed)
Patch Set: Fix Android compile Created 4 years, 2 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/extensions/api/automation_internal/automation_action_adapter.h
diff --git a/chrome/browser/extensions/api/automation_internal/automation_action_adapter.h b/chrome/browser/extensions/api/automation_internal/automation_action_adapter.h
index f62069836299096730ac0c47010daa19a4b1bff2..d11e1c7308a7c78e7b9581cd081b3007472534b2 100644
--- a/chrome/browser/extensions/api/automation_internal/automation_action_adapter.h
+++ b/chrome/browser/extensions/api/automation_internal/automation_action_adapter.h
@@ -7,32 +7,21 @@
#include <stdint.h>
+#include "ui/accessibility/ax_enums.h"
#include "ui/gfx/geometry/point.h"
+namespace ui {
+struct AXActionData;
+}
+
namespace extensions {
// Adapts an object to receive actions from the Automation extension API.
class AutomationActionAdapter {
public:
- // Performs a default action (e.g. click, check) on the target node.
- virtual void DoDefault(int32_t id) = 0;
-
- // Performs a focus action on the target node.
- virtual void Focus(int32_t id) = 0;
-
- // Makes the node visible by scrolling; does not change nodes from hidden to
- // shown.
- virtual void MakeVisible(int32_t id) = 0;
-
- // Sets selection for anchor and focus node/offset pairs. Also used to set
- // selection in text fields.
- virtual void SetSelection(int32_t anchor_id,
- int32_t anchor_offset,
- int32_t focus_id,
- int32_t focus_offset) = 0;
-
- // Shows the context menu resulting from a right click.
- virtual void ShowContextMenu(int32_t id) = 0;
+ // Performs an action on the target node.
+ virtual void PerformAction(ui::AXAction action,
+ const ui::AXActionData& data) = 0;
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698