| // Copyright 2020 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| module network.mojom; |
| |
| // A loading mode which may be supported by the document resource. |
| enum LoadingMode { |
| // The ordinary loading mode. |
| kDefault, |
| |
| // A mode in which a response fetched without credentials and with other |
| // measures taken to obscure the user's identity may be used for navigation, |
| // even if credentials exist. The document should, if necessary, personalize |
| // itself when it loads, dynamically. |
| kUncredentialedPrefetch, |
| |
| // A mode similar to (and implying the requirements of) |
| // kUncredentialedPrefetch, but where the document may load and execute |
| // script before navigation. The document should, if necessary, personalize |
| // itself after loading when credentials become available, dynamically. |
| kUncredentialedPrerender, |
| |
| // A mode in which a response opts in to same site cross origin prerendering. |
| kCredentialedPrerender, |
| |
| // A mode to opt-in to being loaded in a fenced frame. The navigation in the |
| // root fenced frame node should not be successful if the mode is not present. |
| kFencedFrame, |
| |
| // A mode that cross-origin iframes experience the prerendering state in the |
| // same way that same-origin iframes or top-level prerendered pages do. |
| kPrerenderCrossOriginFrames, |
| |
| }; |
| |
| // https://github.com/jeremyroman/alternate-loading-modes/blob/gh-pages/opt-in.md |
| struct SupportsLoadingMode { |
| array<LoadingMode> supported_modes; |
| }; |