// Copyright 2013 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. function dumpDevices(devices) { $('#deviceinfos').empty(); $('#deviceinfos').append(outputDevicesToList(devices)); } function outputDevicesToList(devices) { var table = $(''); table.append($("" + "" + "" + "" + "" + "" + "")); for (i = 0; i < devices.length; i++) { table.append($("" + "" + "" + "" + "" + "" + "")); } return table; } // Add an event listener to listen for changes to device info. The // callback would redisplay the list of devices. chrome.signedInDevices.onDeviceInfoChange.addListener(dumpDevices); function populateDevices() { // Get the list of devices and display it. chrome.signedInDevices.get(false, dumpDevices); } document.addEventListener('DOMContentLoaded', function () { populateDevices(); });
" + "Name" + "" + "OS" + "" + "Id" + "" + "Type" + "" + "Chrome Version" + "
" + devices[i].name + "" + devices[i].os + "" + devices[i].id + "" + devices[i].type + "" + devices[i].chromeVersion + "