| 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.copresence</code> API to communicate with other nearby | 5 // Use the <code>chrome.copresence</code> API to communicate with other nearby |
| 6 // devices using Google's copresence service. | 6 // devices using Google's copresence service. |
| 7 [use_movable_types=true] namespace copresence { | 7 namespace copresence { |
| 8 // Suggestions to copresence on how to do the publication and subscription. | 8 // Suggestions to copresence on how to do the publication and subscription. |
| 9 // Note: These are only suggestions. Actual behavior may not always match | 9 // Note: These are only suggestions. Actual behavior may not always match |
| 10 // what is requested. | 10 // what is requested. |
| 11 dictionary Strategy { | 11 dictionary Strategy { |
| 12 // Attempt to use low power mode. Defaults to false. | 12 // Attempt to use low power mode. Defaults to false. |
| 13 boolean? lowPower; | 13 boolean? lowPower; |
| 14 // Attempt to only broadcast. Using this with onlyScan can result in both | 14 // Attempt to only broadcast. Using this with onlyScan can result in both |
| 15 // being ignored. Defaults to false. | 15 // being ignored. Defaults to false. |
| 16 boolean? onlyBroadcast; | 16 boolean? onlyBroadcast; |
| 17 // Attempt to only scan. Using this with onlyBroadcast can result in both | 17 // Attempt to only scan. Using this with onlyBroadcast can result in both |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 interface Events { | 139 interface Events { |
| 140 // Fired when new messages arrive. | 140 // Fired when new messages arrive. |
| 141 static void onMessagesReceived(DOMString subscriptionId, | 141 static void onMessagesReceived(DOMString subscriptionId, |
| 142 Message[] messages); | 142 Message[] messages); |
| 143 | 143 |
| 144 // Fired when a new copresence status update is available. | 144 // Fired when a new copresence status update is available. |
| 145 static void onStatusUpdated(Status status); | 145 static void onStatusUpdated(Status status); |
| 146 }; | 146 }; |
| 147 }; | 147 }; |
| 148 | 148 |
| OLD | NEW |