// Copyright 2026 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. module blink.mojom; import "services/viz/public/mojom/compositing/compositor_frame_sink.mojom"; import "services/viz/public/mojom/compositing/frame_sink_id.mojom"; import "services/viz/public/mojom/compositing/local_surface_id.mojom"; import "ui/gfx/geometry/mojom/geometry.mojom"; // Implemented on the browser side by the graphics/windowing layer // (e.g. UnboundedSurfaceWindow). interface UnboundedSurfaceHost { // Connects the dedicated rendering surface to the browser's compositor. GetCompositorFrameSink( pending_receiver sink, pending_remote client); // Updates the bounds of the allocated window in screen coordinates. UpdateBounds(gfx.mojom.Rect bounds); // Signals that the renderer has presented a new frame after dismissing // the unbounded window. DidPresentFrameAfterDismissal(); // Signals that the renderer canceled dismissal via beforetoggle event. DidCancelDismissal(); }; // Implemented on the renderer side to receive events from the browser. interface UnboundedSurfaceClient { // Invoked when the window is created and a LocalSurfaceId is allocated. OnSurfaceAllocated( viz.mojom.FrameSinkId frame_sink_id, viz.mojom.LocalSurfaceId local_surface_id); // Invoked when the surface is dismissed (e.g., via ESC key or light dismiss). OnDismissed(); };