blob: fdb729a806ab9f87e88bfce4fd9663a626fd2793 [file] [log] [blame]
// Copyright 2014 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.
enum ConnectionType {
enum EffectiveConnectionType {
typedef unrestricted double Megabit;
typedef unsigned long long Milliseconds;
] interface NetworkInformation : EventTarget {
[RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoType] readonly attribute ConnectionType type;
[RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoDownlinkMax] readonly attribute Megabit downlinkMax;
[MeasureAs=NetInfoOnChange] attribute EventHandler onchange;
[RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoOnTypeChange] attribute EventHandler ontypechange;
[MeasureAs=NetInfoEffectiveType] readonly attribute EffectiveConnectionType effectiveType;
[MeasureAs=NetInfoRtt] readonly attribute Milliseconds rtt;
[MeasureAs=NetInfoDownlink] readonly attribute Megabit downlink;
[MeasureAs=NetInfoSaveData] readonly attribute boolean saveData;