OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
Matt Perry
2013/08/12 22:21:01
Add an entry to chrome/extensions/docs/templates/p
lipalani1
2013/08/13 22:42:37
Done. Not sure if I have done it right! But it fol
| |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Use the <code>chrome.signedInDevices</code> to get a list of devices | |
6 // signed into chrome with the same account as the current profile. | |
7 [nodoc] | |
8 namespace signedinDevices { | |
Matt Perry
2013/08/12 22:21:01
Is "signed in" one word or two? I think two. So th
lipalani1
2013/08/13 22:42:37
I decided on one word after looking at the word Si
dharcourt
2013/08/15 22:12:04
Came across this in passing: Since API callers won
Matt Perry
2013/08/15 22:25:19
Yeah, I agree. Sorry I didn't push back more. The
| |
9 enum OS { | |
10 win, | |
11 mac, | |
12 linux, | |
13 chrome_os, | |
14 android, | |
15 ios, | |
16 unknown | |
17 }; | |
18 | |
19 enum DeviceType { | |
20 desktop_or_laptop, | |
21 phone, | |
22 tablet, | |
23 unknown | |
24 }; | |
25 | |
26 dictionary DeviceInfo { | |
27 // Name of the device. This name is usually set by the user | |
28 // when setting up a device. | |
29 DOMString name; | |
30 | |
31 // Unique Id for this device. Note: The id is meaningul only | |
Matt Perry
2013/08/12 22:21:01
meaningful*
lipalani1
2013/08/13 22:42:37
Done.
| |
32 // in the current device. This id cannot be used to refer to the | |
33 // same device from another device or extension. | |
34 DOMString id; | |
35 | |
36 // The OS of the device. | |
37 OS os; | |
38 | |
39 // Device Type. | |
40 DeviceType type; | |
41 | |
42 // Version of chrome running in this device. | |
43 DOMString chromeVersion; | |
44 }; | |
45 | |
46 callback DeviceInfoCallback = void(DeviceInfo[] devices); | |
47 | |
48 interface Functions { | |
49 // Gets the array of signed in devices, signed into the same account | |
50 // as the current profile. | |
51 // |isLocal|: If true only return the information for the local device. If | |
52 // false or omitted return the list of all devices including the local | |
53 // device. | |
54 // |callback| The callback to be invoked with the array of DeviceInfo | |
Matt Perry
2013/08/12 22:21:01
use consistent punctuation. single : after the |va
lipalani1
2013/08/13 22:42:37
Done.
| |
55 // objects. | |
56 static void Get(optional boolean isLocal, DeviceInfoCallback callback); | |
57 }; | |
58 | |
59 interface Events { | |
60 // Fired If the DeviceInfo object of any of the signed in devices | |
Matt Perry
2013/08/12 22:21:01
lowercase if*
lipalani1
2013/08/13 22:42:37
Done.
| |
61 // change or a new device is added or a device removed. | |
62 // |callback|-The callback to be invoked with the array of DeviceInfo | |
Matt Perry
2013/08/12 22:21:01
same here
lipalani1
2013/08/13 22:42:37
Done.
| |
63 // objects. | |
64 static void onDeviceInfoChange(DeviceInfoCallback callback); | |
65 }; | |
66 }; | |
OLD | NEW |