Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5816)

Unified Diff: chrome/common/extensions/api/signedin_devices.idl

Issue 22706006: Implementation of the DeviceInfo get API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For review. Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..aa4a18c794b43d0a6e8c92c06874a2c8846ed17b
--- /dev/null
+++ b/chrome/common/extensions/api/signedin_devices.idl
@@ -0,0 +1,66 @@
+// 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
+// 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> to get a list of devices
+// signed into chrome with the same account as the current profile.
+[nodoc]
+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
+ 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 meaningul only
Matt Perry 2013/08/12 22:21:01 meaningful*
lipalani1 2013/08/13 22:42:37 Done.
+ // 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
Matt Perry 2013/08/12 22:21:01 use consistent punctuation. single : after the |va
lipalani1 2013/08/13 22:42:37 Done.
+ // objects.
+ static void Get(optional boolean isLocal, DeviceInfoCallback callback);
+ };
+
+ interface Events {
+ // 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.
+ // change or a new device is added or a device removed.
+ // |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.
+ // objects.
+ static void onDeviceInfoChange(DeviceInfoCallback callback);
+ };
+};
« chrome/browser/sync/glue/device_info.cc ('K') | « chrome/common/extensions/api/api.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698