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

Side by Side Diff: chrome/browser/extensions/api/automation_internal/automation_action_adapter.h

Issue 2426193003: Re-land: Create AXAction and AXActionData as a way to simplify accessibility actions (Closed)
Patch Set: Rebase 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/automation_internal/automation_internal_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAP TER_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAP TER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAP TER_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAP TER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "ui/accessibility/ax_enums.h"
10 #include "ui/gfx/geometry/point.h" 11 #include "ui/gfx/geometry/point.h"
11 12
13 namespace ui {
14 struct AXActionData;
15 }
16
12 namespace extensions { 17 namespace extensions {
13 18
14 // Adapts an object to receive actions from the Automation extension API. 19 // Adapts an object to receive actions from the Automation extension API.
15 class AutomationActionAdapter { 20 class AutomationActionAdapter {
16 public: 21 public:
17 // Performs a default action (e.g. click, check) on the target node. 22 // Performs an action on the target node.
18 virtual void DoDefault(int32_t id) = 0; 23 virtual void PerformAction(const ui::AXActionData& data) = 0;
19
20 // Performs a focus action on the target node.
21 virtual void Focus(int32_t id) = 0;
22
23 // Makes the node visible by scrolling; does not change nodes from hidden to
24 // shown.
25 virtual void MakeVisible(int32_t id) = 0;
26
27 // Sets selection for anchor and focus node/offset pairs. Also used to set
28 // selection in text fields.
29 virtual void SetSelection(int32_t anchor_id,
30 int32_t anchor_offset,
31 int32_t focus_id,
32 int32_t focus_offset) = 0;
33
34 // Shows the context menu resulting from a right click.
35 virtual void ShowContextMenu(int32_t id) = 0;
36 }; 24 };
37 25
38 } // namespace extensions 26 } // namespace extensions
39 27
40 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_A DAPTER_H_ 28 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_A DAPTER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/automation_internal/automation_internal_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698