// Copyright 2024 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_RENDERER_HOST_NAVIGATION_STATE_KEEP_ALIVE_H_ #define CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_STATE_KEEP_ALIVE_H_ #include "base/memory/safe_ref.h" #include "base/memory/scoped_refptr.h" #include "third_party/blink/public/common/tokens/tokens.h" #include "third_party/blink/public/mojom/frame/remote_frame.mojom.h" namespace content { class PolicyContainerHost; class RenderFrameHostImpl; class SiteInstanceImpl; class StoragePartitionImpl; // A keepalive handle for state that may be referenced during a navigation, // since a navigation can outlive its initiating frame. The lifetime of the // keepalive handle is tied to a Mojo message pipe; closing the message pipe // will destroy the corresponding keepalive object. Typically, this means // that an active navigation retains a mojo::Remote endpoint for a // `blink::mojom::NavigationStateKeepAliveHandle`. // Anything kept alive by this class needs to be owned by this class, either // explicitly or collectively (e.g. by scoped_refptr). class NavigationStateKeepAlive : public blink::mojom::NavigationStateKeepAliveHandle { … }; } // namespace content #endif // CONTENT_BROWSER_RENDERER_HOST_NAVIGATION_STATE_KEEP_ALIVE_H_