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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAPTER_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAPTER_H_
8 #include "ui/gfx/geometry/point.h"
10 namespace extensions
{
12 // Adapts an object to receive actions from the Automation extension API.
13 class AutomationActionAdapter
{
15 // Performs a default action (e.g. click, check) on the target node.
16 virtual void DoDefault(int32 id
) = 0;
18 // Performs a focus action on the target node.
19 virtual void Focus(int32 id
) = 0;
21 // Makes the node visible by scrolling; does not change nodes from hidden to
23 virtual void MakeVisible(int32 id
) = 0;
25 // Sets selection for a start and end index (usually only relevant on text
27 virtual void SetSelection(int32 id
, int32 start
, int32 end
) = 0;
29 // Shows the context menu resulting from a right click.
30 virtual void ShowContextMenu(int32 id
) = 0;
33 } // namespace extensions
35 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAPTER_H_