pub trait BrowserPaneCloseOps {
// Required methods
fn take_browser_hwnd(&self, label: &str) -> Option<usize>;
fn destroy_hwnd(&self, hwnd: usize);
}Expand description
Abstraction over the CEF-side operations close() performs on the host
process. Production implements this over &Arc<AppState> and Win32;
tests implement it with a recording mock so the close-path state machine
can be exercised without real CEF/HWNDs.
Kept minimal (just two methods) to avoid a dependency graph that has to
be updated every time close() grows. Other ops (focus, resize, …)
can gain their own traits when they need testing, or graduate to a
unified BrowserPaneCefBridge once the shape is stable.
Required Methods§
Sourcefn take_browser_hwnd(&self, label: &str) -> Option<usize>
fn take_browser_hwnd(&self, label: &str) -> Option<usize>
Remove the Browser for this label from the registry. Return its
outer HWND as a pointer-sized value, or None if there is no
Browser or no HWND. Dropping the Browser Arc is the implementation’s
responsibility — production drops before returning so Chromium’s
refcount isn’t held by our scope.
Sourcefn destroy_hwnd(&self, hwnd: usize)
fn destroy_hwnd(&self, hwnd: usize)
Destroy the given HWND. Production calls Win32 DestroyWindow.
Called only with values returned from take_browser_hwnd.