| OLD | NEW |
| 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" | |
| 11 #include "ui/gfx/geometry/point.h" | 10 #include "ui/gfx/geometry/point.h" |
| 12 | 11 |
| 13 namespace ui { | |
| 14 struct AXActionData; | |
| 15 } | |
| 16 | |
| 17 namespace extensions { | 12 namespace extensions { |
| 18 | 13 |
| 19 // Adapts an object to receive actions from the Automation extension API. | 14 // Adapts an object to receive actions from the Automation extension API. |
| 20 class AutomationActionAdapter { | 15 class AutomationActionAdapter { |
| 21 public: | 16 public: |
| 22 // Performs an action on the target node. | 17 // Performs a default action (e.g. click, check) on the target node. |
| 23 virtual void PerformAction(const ui::AXActionData& data) = 0; | 18 virtual void DoDefault(int32_t id) = 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; |
| 24 }; | 36 }; |
| 25 | 37 |
| 26 } // namespace extensions | 38 } // namespace extensions |
| 27 | 39 |
| 28 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_A
DAPTER_H_ | 40 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_A
DAPTER_H_ |
| OLD | NEW |