// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_BROWSER_DISPLAY_CUTOUT_SAFE_AREA_INSETS_HOST_H_ #define CONTENT_BROWSER_DISPLAY_CUTOUT_SAFE_AREA_INSETS_HOST_H_ #include "content/common/content_export.h" #include "content/public/browser/render_frame_host_receiver_set.h" #include "third_party/blink/public/mojom/page/display_cutout.mojom.h" #include "ui/gfx/geometry/insets.h" namespace content { class RenderFrameHost; class WebContentsImpl; // Handles the connection between Blink and the browser / embedder for // safe area insets. // This is a `WebContents` scoped abstract base class for a Host that // handles Safe Area Insets such // as the Notch (Display Cutout) and the Android Edge To Edge feature. // The implementation within this class handles communication with Blink. // The viewport-fit metadata from a page is sent by Blink to // the embedder through // `NotifyViewportFitChanged`. When that triggers a change to the Safe // Area, e.g. a `viewport-fit=cover` to allow drawing under the Notch, the // embedder responds to Blink through `SetSafeArea` to allow the CSS of // the page to adjust its drawing appropriately for that Safe Area, e.g. // pad a header to extend below the Notch. class CONTENT_EXPORT SafeAreaInsetsHost : public blink::mojom::DisplayCutoutHost { … }; } // namespace content #endif // CONTENT_BROWSER_DISPLAY_CUTOUT_SAFE_AREA_INSETS_HOST_H_