/* * Copyright (c) 2023, Linus Groh * * SPDX-License-Identifier: BSD-2-Clause */ #include namespace WebView { WebContentClient& ViewImplementation::client() { VERIFY(m_client_state.client); return *m_client_state.client; } WebContentClient const& ViewImplementation::client() const { VERIFY(m_client_state.client); return *m_client_state.client; } void ViewImplementation::zoom_in() { if (m_zoom_level >= ZOOM_MAX_LEVEL) return; m_zoom_level += ZOOM_STEP; update_zoom(); } void ViewImplementation::zoom_out() { if (m_zoom_level <= ZOOM_MIN_LEVEL) return; m_zoom_level -= ZOOM_STEP; update_zoom(); } void ViewImplementation::reset_zoom() { m_zoom_level = 1.0f; update_zoom(); } void ViewImplementation::get_source() { client().async_get_source(); } }