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 Publish (sys::ComponentContext & component_context)

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 86 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 70 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 151 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 174 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 181 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 123 of file ../../src/ui/scenic/lib/focus/focus_manager.cc

void SetAutoFocusForTest (zx_koid_t requestor, zx_koid_t target)

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

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

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