| // Copyright 2020 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module blink.mojom; |
| |
| // This enum lists eviction reasons from the renderer. |
| enum RendererEvictionReason { |
| // JavaScript execution ocurrs. |
| kJavaScriptExecution, |
| // Datapipe for reading network requests is already drained upon bfcache entrance. |
| kNetworkRequestDatapipeDrained, |
| // Network request is redirected. |
| kNetworkRequestRedirected, |
| // Network request is open for too long. |
| kNetworkRequestTimeout, |
| // Network request buffers too much data. |
| kNetworkExceedsBufferLimit, |
| }; |
| // |
| // This interface defines back-forward cache related methods that will be |
| // invoked from the renderer process. |
| // |
| // Calls to any of the methods defined in this interface must be allowed while |
| // the frame is in the back-forward cache. Calls to other (associated) interface |
| // methods while the frame is in the back-forward cache are disallowed and may |
| // trigger a renderer kill, depending on policy. |
| interface BackForwardCacheControllerHost { |
| // Evicts the page from the back/forward cache due to e.g., JavaScript |
| // execution and network request redirect. |
| EvictFromBackForwardCache(RendererEvictionReason reason); |
| }; |