File: accessibility_bridge_fuchsia.h

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (55 lines) | stat: -rw-r--r-- 1,994 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_ACCESSIBILITY_PLATFORM_FUCHSIA_ACCESSIBILITY_BRIDGE_FUCHSIA_H_
#define UI_ACCESSIBILITY_PLATFORM_FUCHSIA_ACCESSIBILITY_BRIDGE_FUCHSIA_H_

#include <fidl/fuchsia.accessibility.semantics/cpp/fidl.h>
#include <lib/inspect/cpp/vmo/types.h>

#include <optional>

#include "base/component_export.h"

namespace ui {

// Interface for clients to interact with fuchsia's platform accessibility
// framework.
class COMPONENT_EXPORT(AX_PLATFORM) AccessibilityBridgeFuchsia {
 public:
  virtual ~AccessibilityBridgeFuchsia() = default;

  // Translates AXNodeDescriptorFuchsias to fuchsia IDs, fills the
  // corresponding fields in |node_update.node_data|, and sends the update
  // to fuchsia.
  //
  // Note that |node_update.node_data| should not have any node ID fields
  // (node_id, child_ids, offset_container_id, etc.) filled initially.
  virtual void UpdateNode(fuchsia_accessibility_semantics::Node node) = 0;

  // Translates |node_id| to a fuchsia node ID, and sends the deletion to
  // fuchsia.
  virtual void DeleteNode(uint32_t node_id) = 0;

  // hit_test_request_id: A unique ID for the hit test, generated by the client.
  // result: The fuchsia node ID of the entity returned by the hit test.
  //
  // Method to notify the accessibility bridge when a hit test result is
  // received.
  virtual void OnAccessibilityHitTestResult(int hit_test_request_id,
                                            std::optional<uint32_t> result) = 0;

  // Returns the device scale factor.
  virtual float GetDeviceScaleFactor() = 0;

  // Specifies the unique ID of the root platform node.
  virtual void SetRootID(uint32_t root_node_id) = 0;

  // Returns an inspect::Node for the caller to own.
  virtual inspect::Node GetInspectNode() = 0;
};

}  // namespace ui

#endif  // UI_ACCESSIBILITY_PLATFORM_FUCHSIA_ACCESSIBILITY_BRIDGE_FUCHSIA_H_