blob: c61d364be3639c372d433c40dab73751e67bf07a [file] [log] [blame]
// Copyright 2018 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 network.mojom;
import "mojo/public/mojom/base/time.mojom";
import "services/network/public/mojom/network_types.mojom";
// A client interface that subscribes to network quality change events from
// NetworkQualityEstimatorManager.
interface NetworkQualityEstimatorManagerClient {
// Invoked when there is a change in the network quality. The effective
// connection type is computed by the network quality estimator at regular
// intervals and at certain events (e.g., connection change).
// |http_rtt| is the current estimate of the HTTP RTT. The RTT at the HTTP
// layer measures the time from when the request was sent (this happens after
// the connection is established) to the time when the response headers were
// received. A negative value of |http_rtt| implies that the RTT estimate
// was unavailable.
// |downlink_bandwidth_kbps| is the current downlink throughput estimate (in
// kilobits per second). A negative value of |downlink_bandwidth_kbps| implies
// that the downlink throughput estimate was unavailable.
OnNetworkQualityChanged(
EffectiveConnectionType type,
mojo_base.mojom.TimeDelta http_rtt,
int32 downlink_bandwidth_kbps);
};
// An interface that broadcasts network quality change events.
interface NetworkQualityEstimatorManager {
// Requests to receive notification when there is a change in the network
// quality.
RequestNotifications(NetworkQualityEstimatorManagerClient client_ptr);
};