| // 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; |
| |
| enum WebBundleErrorType { |
| kMetadataParseError, |
| kResponseParseError, |
| kResourceNotFound, |
| kMemoryQuotaExceeded, |
| kServingConstraintsNotMet, |
| kWebBundleFetchFailed, |
| kWebBundleRedirected, |
| kDeprecationWarning, |
| }; |
| |
| // A handle to a WebBundle instance in the Network Service. Created by a |
| // renderer, and its remote endpoint is passed to the Network Service. The |
| // receiving endpoint is held in the renderer and closed to tell the Network |
| // Service that the Bundle is no longer needed. |
| interface WebBundleHandle { |
| // Used to create a copy of this handle. |
| Clone(pending_receiver<WebBundleHandle> receiver); |
| |
| // Report errors to the renderer. |
| OnWebBundleError(WebBundleErrorType type, string message); |
| |
| // Report to the renderer whether successfully loaded the data or failed. |
| OnWebBundleLoadFinished(bool success); |
| }; |