| Index: chrome/common/extensions/api/signedin_devices.idl
|
| diff --git a/chrome/common/extensions/api/signedin_devices.idl b/chrome/common/extensions/api/signedin_devices.idl
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..977c167009c5bb997b8f03336874b58dee638307
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/api/signedin_devices.idl
|
| @@ -0,0 +1,65 @@
|
| +// Copyright (c) 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.
|
| +
|
| +// Use the <code>chrome.signedinDevices</code> API to get a list of devices
|
| +// signed into chrome with the same account as the current profile.
|
| +namespace signedinDevices {
|
| + enum OS {
|
| + win,
|
| + mac,
|
| + linux,
|
| + chrome_os,
|
| + android,
|
| + ios,
|
| + unknown
|
| + };
|
| +
|
| + enum DeviceType {
|
| + desktop_or_laptop,
|
| + phone,
|
| + tablet,
|
| + unknown
|
| + };
|
| +
|
| + dictionary DeviceInfo {
|
| + // Name of the device. This name is usually set by the user
|
| + // when setting up a device.
|
| + DOMString name;
|
| +
|
| + // Unique Id for this device. Note: The id is meaningful only
|
| + // in the current device. This id cannot be used to refer to the
|
| + // same device from another device or extension.
|
| + DOMString id;
|
| +
|
| + // The OS of the device.
|
| + OS os;
|
| +
|
| + // Device Type.
|
| + DeviceType type;
|
| +
|
| + // Version of chrome running in this device.
|
| + DOMString chromeVersion;
|
| + };
|
| +
|
| + callback DeviceInfoCallback = void(DeviceInfo[] devices);
|
| +
|
| + interface Functions {
|
| + // Gets the array of signed in devices, signed into the same account
|
| + // as the current profile.
|
| + // |isLocal|: If true only return the information for the local device. If
|
| + // false or omitted return the list of all devices including the local
|
| + // device.
|
| + // |callback|: The callback to be invoked with the array of DeviceInfo
|
| + // objects.
|
| + static void Get(optional boolean isLocal, DeviceInfoCallback callback);
|
| + };
|
| +
|
| + interface Events {
|
| + // Fired if the DeviceInfo object of any of the signed in devices
|
| + // change or a new device is added or a device removed.
|
| + // |callback|: The callback to be invoked with the array of DeviceInfo
|
| + // objects.
|
| + static void onDeviceInfoChange(DeviceInfoCallback callback);
|
| + };
|
| +};
|
|
|