Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Side by Side Diff: third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl

Issue 2863973003: Expose RTT and downlink bandwidth using experimental Javascript API (Closed)
Patch Set: kinuko comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // https://wicg.github.io/netinfo/#the-networkinformation-interface 5 // https://wicg.github.io/netinfo/#the-networkinformation-interface
6 6
7 enum ConnectionType { 7 enum ConnectionType {
8 "cellular", 8 "cellular",
9 "bluetooth", 9 "bluetooth",
10 "ethernet", 10 "ethernet",
11 "wifi", 11 "wifi",
12 "wimax", 12 "wimax",
13 "other", 13 "other",
14 "none", 14 "none",
15 "unknown" 15 "unknown"
16 }; 16 };
17 17
18 typedef unrestricted double Megabit; 18 typedef unrestricted double Megabit;
19 typedef unsigned long long Milliseconds;
19 20
20 [ 21 [
21 ActiveScriptWrappable, 22 ActiveScriptWrappable,
22 DependentLifetime, 23 DependentLifetime,
23 Exposed=(Window,Worker), 24 Exposed=(Window,Worker),
24 RuntimeEnabled=NetworkInformation, 25 RuntimeEnabled=NetworkInformation,
25 ] interface NetworkInformation : EventTarget { 26 ] interface NetworkInformation : EventTarget {
26 [MeasureAs=NetInfoType] readonly attribute ConnectionType type; 27 [MeasureAs=NetInfoType] readonly attribute ConnectionType type;
27 [RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoDownlinkMax] readonly a ttribute Megabit downlinkMax; 28 [RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoDownlinkMax] readonly a ttribute Megabit downlinkMax;
28 [RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoOnChange] attribute Eve ntHandler onchange; 29 [RuntimeEnabled=NetInfoDownlinkMax, MeasureAs=NetInfoOnChange] attribute Eve ntHandler onchange;
29 [MeasureAs=NetInfoOnTypeChange] attribute EventHandler ontypechange; 30 [MeasureAs=NetInfoOnTypeChange] attribute EventHandler ontypechange;
31 [RuntimeEnabled=NetInfoRtt, MeasureAs=NetInfoRtt] readonly attribute Millise conds rtt;
32 [RuntimeEnabled=NetInfoDownlink, MeasureAs=NetInfoDownlink] readonly attribu te Megabit downlink;
30 }; 33 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698