Home | History | Annotate | Download | only in automation_internal
      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.
      4 
      5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAPTER_H_
      6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAPTER_H_
      7 
      8 namespace extensions {
      9 
     10 // Adapts an object to receive actions from the Automation extension API.
     11 class AutomationActionAdapter {
     12  public:
     13   // Performs a default action (e.g. click, check) on the target node.
     14   virtual void DoDefault(int32 id) = 0;
     15 
     16   // Performs a focus action on the target node.
     17   virtual void Focus(int32 id) = 0;
     18 
     19   // Makes the node visible by scrolling; does not change nodes from hidden to
     20   // shown.
     21   virtual void MakeVisible(int32 id) = 0;
     22 
     23   // Sets selection for a start and end index (usually only relevant on text
     24   // fields).
     25   virtual void SetSelection(int32 id, int32 start, int32 end) = 0;
     26 };
     27 
     28 }  // namespace extensions
     29 
     30 #endif  // CHROME_BROWSER_EXTENSIONS_API_AUTOMATION_INTERNAL_AUTOMATION_ACTION_ADAPTER_H_
     31