diff --git a/chrome/chrome-app-tests.ts b/chrome/chrome-app-tests.ts index 970e03517..466571107 100644 --- a/chrome/chrome-app-tests.ts +++ b/chrome/chrome-app-tests.ts @@ -316,3 +316,12 @@ function testSocketsTcpServerTypes(): void { socketInfo.localAddress = "192.168.0.2"; socketInfo.localPort = 8000; } + +function testSystemNetwork() { + chrome.system.network.getNetworkInterfaces((networkInterfaces) => { + var iface: chrome.system.network.NetworkInterface; + for (var i in networkInterfaces) { + iface = networkInterfaces[i]; + } + }); +} diff --git a/chrome/chrome-app.d.ts b/chrome/chrome-app.d.ts index f75f7dca6..d40fa3b2d 100644 --- a/chrome/chrome-app.d.ts +++ b/chrome/chrome-app.d.ts @@ -378,3 +378,16 @@ declare module chrome.sockets.tcpServer { var onAccept: Event; var onAcceptError: Event; } + +//////////////////// +// System - Network +//////////////////// +declare module chrome.system.network { + interface NetworkInterface { + name: string; + address: string; + prefixLength: number; + } + + export function getNetworkInterfaces(callback: (networkInterfaces: NetworkInterface[]) => void): void; +}