class FocusManager

Defined at line 37 of file ../../src/ui/scenic/lib/focus/focus_manager.h

Class for tracking focus state.

Public Methods

void FocusManager (async_dispatcher_t * input_dispatcher, std::shared_ptr<view_tree::SnapshotHolder> snapshot_holder, inspect::Node inspect_node)

Defined at line 32 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

void FocusManager (FocusManager && other)

Defined at line 42 of file ../../src/ui/scenic/lib/focus/focus_manager.h

const std::vector<zx_koid_t> & GetFocusChain (const view_tree::Snapshot & snapshot)

Defined at line 62 of file ../../src/ui/scenic/lib/focus/focus_manager.h

void Bind (fidl::InterfaceRequest<fuchsia::ui::focus::FocusChainListenerRegistry> request)

Defined at line 65 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

FocusChangeStatus RequestFocus (zx_koid_t requestor, zx_koid_t request, const view_tree::Snapshot & snapshot)

Request focus transfer to the proposed ViewRef's KOID |request|, on the behalf of |requestor|.

Return kAccept if successful.

- If |requestor| is not authorized to focus |request|, return error.

- If the |request| is not in |snapshot_.view_tree|, return error.

- If the |request| is otherwise valid, but violates the focus transfer policy, return error.

Defined at line 77 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

void OnNewViewTreeSnapshot ()

Posts an async task to the input thread to eagerly inspect the latest view tree snapshot

in `snapshot_holder_`, repair any broken focus chains, and notify outstanding hanging gets.

Defined at line 71 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

void Register (fidl::InterfaceHandle<fuchsia::ui::focus::FocusChainListener> focus_chain_listener)

|fuchsia.ui.focus.FocusChainListenerRegistry|

Defined at line 142 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

void RegisterViewRefFocused (zx_koid_t koid, fidl::InterfaceRequest<fuchsia::ui::views::ViewRefFocused> vrf)

Defined at line 165 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

void RegisterViewFocuser (zx_koid_t koid, fidl::InterfaceRequest<fuchsia::ui::views::Focuser> focuser)

Defined at line 172 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

FocusChangeStatus RequestFocusForTest (zx_koid_t requestor, zx_koid_t request)

Variants that conveniently obtain a snapshot from the snapshot holder.

Defined at line 114 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

void SetAutoFocusForTest (zx_koid_t requestor, zx_koid_t target)

Defined at line 215 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

const std::vector<zx_koid_t> & GetFocusChainForTest ()

Defined at line 119 of file ../../src/ui/scenic/lib/focus/focus_manager.cc