[flutter] Remove old A11y API's. (flutter/engine#12308)
This commit is contained in:
@@ -23,11 +23,10 @@ AccessibilityBridge::AccessibilityBridge(
|
||||
FML_LOG(ERROR) << "Flutter cannot connect to SemanticsManager with status: "
|
||||
<< zx_status_get_string(status) << ".";
|
||||
});
|
||||
fidl::InterfaceHandle<
|
||||
fuchsia::accessibility::semantics::SemanticActionListener>
|
||||
fidl::InterfaceHandle<fuchsia::accessibility::semantics::SemanticListener>
|
||||
listener_handle;
|
||||
binding_.Bind(listener_handle.NewRequest());
|
||||
fuchsia_semantics_manager_->RegisterView(
|
||||
fuchsia_semantics_manager_->RegisterViewForSemantics(
|
||||
std::move(view_ref), std::move(listener_handle), tree_ptr_.NewRequest());
|
||||
}
|
||||
|
||||
@@ -223,20 +222,22 @@ void AccessibilityBridge::AddSemanticsNodeUpdate(
|
||||
PruneUnreachableNodes();
|
||||
|
||||
tree_ptr_->UpdateSemanticNodes(std::move(nodes));
|
||||
tree_ptr_->Commit();
|
||||
// TODO(dnfield): Implement the callback here
|
||||
// https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=35718.
|
||||
tree_ptr_->CommitUpdates([]() {});
|
||||
}
|
||||
|
||||
// |fuchsia::accessibility::semantics::SemanticActionListener|
|
||||
// |fuchsia::accessibility::semantics::SemanticListener|
|
||||
void AccessibilityBridge::OnAccessibilityActionRequested(
|
||||
uint32_t node_id,
|
||||
fuchsia::accessibility::semantics::Action action,
|
||||
fuchsia::accessibility::semantics::SemanticActionListener::
|
||||
fuchsia::accessibility::semantics::SemanticListener::
|
||||
OnAccessibilityActionRequestedCallback callback) {}
|
||||
|
||||
// |fuchsia::accessibility::semantics::SemanticActionListener|
|
||||
// |fuchsia::accessibility::semantics::SemanticListener|
|
||||
void AccessibilityBridge::HitTest(
|
||||
fuchsia::math::PointF local_point,
|
||||
fuchsia::accessibility::semantics::SemanticActionListener::HitTestCallback
|
||||
fuchsia::accessibility::semantics::SemanticListener::HitTestCallback
|
||||
callback) {}
|
||||
|
||||
} // namespace flutter_runner
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace flutter_runner {
|
||||
// (e.g. Flutter only sends updates for changed nodes, but Fuchsia requires
|
||||
// the entire flattened subtree to be sent when a node changes.
|
||||
class AccessibilityBridge
|
||||
: public fuchsia::accessibility::semantics::SemanticActionListener {
|
||||
: public fuchsia::accessibility::semantics::SemanticListener {
|
||||
public:
|
||||
// TODO(MI4-2531, FIDL-718): Remove this. We shouldn't be worried about
|
||||
// batching messages at this level.
|
||||
@@ -76,8 +76,7 @@ class AccessibilityBridge
|
||||
|
||||
private:
|
||||
static constexpr int32_t kRootNodeId = 0;
|
||||
fidl::Binding<fuchsia::accessibility::semantics::SemanticActionListener>
|
||||
binding_;
|
||||
fidl::Binding<fuchsia::accessibility::semantics::SemanticListener> binding_;
|
||||
fuchsia::accessibility::semantics::SemanticsManagerPtr
|
||||
fuchsia_semantics_manager_;
|
||||
fuchsia::accessibility::semantics::SemanticTreePtr tree_ptr_;
|
||||
@@ -115,18 +114,24 @@ class AccessibilityBridge
|
||||
// May result in a call to FuchsiaAccessibility::Commit().
|
||||
void PruneUnreachableNodes();
|
||||
|
||||
// |fuchsia::accessibility::semantics::SemanticActionListener|
|
||||
// |fuchsia::accessibility::semantics::SemanticListener|
|
||||
void OnAccessibilityActionRequested(
|
||||
uint32_t node_id,
|
||||
fuchsia::accessibility::semantics::Action action,
|
||||
fuchsia::accessibility::semantics::SemanticActionListener::
|
||||
fuchsia::accessibility::semantics::SemanticListener::
|
||||
OnAccessibilityActionRequestedCallback callback) override;
|
||||
|
||||
// |fuchsia::accessibility::semantics::SemanticActionListener|
|
||||
// |fuchsia::accessibility::semantics::SemanticListener|
|
||||
void HitTest(
|
||||
fuchsia::math::PointF local_point,
|
||||
fuchsia::accessibility::semantics::SemanticActionListener::HitTestCallback
|
||||
fuchsia::accessibility::semantics::SemanticListener::HitTestCallback
|
||||
callback) override;
|
||||
|
||||
// |fuchsia::accessibility::semantics::SemanticListener|
|
||||
void OnSemanticsModeChanged(
|
||||
bool enabled,
|
||||
OnSemanticsModeChangedCallback callback) override {}
|
||||
|
||||
FML_DISALLOW_COPY_AND_ASSIGN(AccessibilityBridge);
|
||||
};
|
||||
} // namespace flutter_runner
|
||||
|
||||
Reference in New Issue
Block a user