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 namespace gcdPrivate { | 7 namespace gcdPrivate { |
8 | 8 |
9 enum SetupType { mdns, wifi, cloud }; | 9 enum SetupType { mdns, wifi, cloud }; |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 // populateWifiPassword was true and the message cannot be parsed as a setup | 36 // populateWifiPassword was true and the message cannot be parsed as a setup |
37 // message. | 37 // message. |
38 setupParseError, | 38 setupParseError, |
39 | 39 |
40 // Could not connect to the device. | 40 // Could not connect to the device. |
41 connectionError, | 41 connectionError, |
42 | 42 |
43 // Error in establishing session. | 43 // Error in establishing session. |
44 sessionError, | 44 sessionError, |
45 | 45 |
| 46 // Unknown session. |
| 47 unknownSessionError, |
| 48 |
46 // Success. | 49 // Success. |
47 success | 50 success |
48 }; | 51 }; |
49 | 52 |
50 enum ConfirmationType { | 53 enum ConfirmationType { |
51 displayCode, | 54 displayCode, |
52 audio | 55 audio |
53 }; | 56 }; |
54 | 57 |
55 callback CloudDeviceListCallback = void(GCDDevice[] devices); | 58 callback CloudDeviceListCallback = void(GCDDevice[] devices); |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // Subscribe to this event to start listening new or updated devices. New | 181 // Subscribe to this event to start listening new or updated devices. New |
179 // listeners will get called with all known devices on the network, and | 182 // listeners will get called with all known devices on the network, and |
180 // status updates for devices available through the cloud. | 183 // status updates for devices available through the cloud. |
181 static void onDeviceStateChanged(GCDDevice device); | 184 static void onDeviceStateChanged(GCDDevice device); |
182 | 185 |
183 // Notifies that device has disappeared. | 186 // Notifies that device has disappeared. |
184 // |deviceId| : The device has disappeared. | 187 // |deviceId| : The device has disappeared. |
185 static void onDeviceRemoved(DOMString deviceId); | 188 static void onDeviceRemoved(DOMString deviceId); |
186 }; | 189 }; |
187 }; | 190 }; |
OLD | NEW |