| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Use the <code>chrome.gcdPrivate</code> API to discover GCD APIs and register | 5 // Use the <code>chrome.gcdPrivate</code> API to discover GCD APIs and register |
| 6 // them. | 6 // them. |
| 7 [platforms=("chromeos", "linux", "mac", "win")] |
| 7 namespace gcdPrivate { | 8 namespace gcdPrivate { |
| 8 | 9 |
| 9 enum SetupType { mdns, wifi, cloud }; | 10 enum SetupType { mdns, wifi, cloud }; |
| 10 | 11 |
| 11 // Represents a GCD device discovered locally or registered to a given user. | 12 // Represents a GCD device discovered locally or registered to a given user. |
| 12 dictionary GCDDevice { | 13 dictionary GCDDevice { |
| 13 // Opaque device identifier to be passed to API. | 14 // Opaque device identifier to be passed to API. |
| 14 DOMString deviceId; | 15 DOMString deviceId; |
| 15 | 16 |
| 16 // How this device was discovered. | 17 // How this device was discovered. |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 // Subscribe to this event to start listening new or updated devices. New | 227 // Subscribe to this event to start listening new or updated devices. New |
| 227 // listeners will get called with all known devices on the network, and | 228 // listeners will get called with all known devices on the network, and |
| 228 // status updates for devices available through the cloud. | 229 // status updates for devices available through the cloud. |
| 229 static void onDeviceStateChanged(GCDDevice device); | 230 static void onDeviceStateChanged(GCDDevice device); |
| 230 | 231 |
| 231 // Notifies that device has disappeared. | 232 // Notifies that device has disappeared. |
| 232 // |deviceId| : The device has disappeared. | 233 // |deviceId| : The device has disappeared. |
| 233 static void onDeviceRemoved(DOMString deviceId); | 234 static void onDeviceRemoved(DOMString deviceId); |
| 234 }; | 235 }; |
| 235 }; | 236 }; |
| OLD | NEW |