class FocusManager

Defined at line 38 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 43 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::ServerEnd<fuchsia_ui_focus::FocusChainListenerRegistry> request)

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

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

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

Return kAccept if successful.

- If |requester| 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 79 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 73 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

void Register (RegisterRequest & request, RegisterCompleter::Sync & completer)

|fidl::Server

<fuchsia

_ui_focus::FocusChainListenerRegistry>|

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

void RegisterViewRefFocused (zx_koid_t koid, fidl::ServerEnd<fuchsia_ui_views::ViewRefFocused> vrf)

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

void RegisterViewFocuser (zx_koid_t koid, fidl::ServerEnd<fuchsia_ui_views::Focuser> focuser)

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

void RegisterFocusChainListener (fidl::ClientEnd<fuchsia_ui_focus::FocusChainListener> focus_chain_listener)

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

FocusChangeStatus RequestFocusForTest (zx_koid_t requester, zx_koid_t request)

Variants that conveniently obtain a snapshot from the snapshot holder.

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

void SetAutoFocusForTest (zx_koid_t requester, zx_koid_t target)

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

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

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