1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Use the <code>chrome.signedInDevices</code> API to get a list of devices
6 // signed into chrome with the same account as the current profile.
7 namespace signedInDevices
{
25 dictionary DeviceInfo
{
26 // Name of the device. This name is usually set by the user
27 // when setting up a device.
30 // Unique Id for this device. Note: The id is meaningful only
31 // in the current device. This id cannot be used to refer to the
32 // same device from another device or extension.
35 // The OS of the device.
41 // Version of chrome running in this device.
42 DOMString chromeVersion
;
45 callback DeviceInfoCallback
= void(DeviceInfo
[] devices
);
48 // Gets the array of signed in devices, signed into the same account
49 // as the current profile.
50 // |isLocal|: If true only return the information for the local device. If
51 // false or omitted return the list of all devices including the local
53 // |callback|: The callback to be invoked with the array of DeviceInfo
55 static
void get
(optional boolean isLocal
, DeviceInfoCallback
callback);
59 // Fired if the DeviceInfo object of any of the signed in devices
60 // change or a new device is added or a device removed.
61 // |callback|: The callback to be invoked with the array of DeviceInfo
63 static
void onDeviceInfoChange
(DeviceInfo
[] devices
);