| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 /** | 5 /** |
| 6 * Javascript for CharacteristicList and CharacteristicListItem, served from | 6 * Javascript for CharacteristicList and CharacteristicListItem, served from |
| 7 * chrome://bluetooth-internals/. | 7 * chrome://bluetooth-internals/. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 cr.define('characteristic_list', function() { | 10 cr.define('characteristic_list', function() { |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 read_encrypted: (this.info.properties & Property.READ_ENCRYPTED) > 0, | 106 read_encrypted: (this.info.properties & Property.READ_ENCRYPTED) > 0, |
| 107 write_encrypted: (this.info.properties & Property.WRITE_ENCRYPTED) > 0, | 107 write_encrypted: (this.info.properties & Property.WRITE_ENCRYPTED) > 0, |
| 108 read_encrypted_authenticated: (this.info.properties & | 108 read_encrypted_authenticated: (this.info.properties & |
| 109 Property.READ_ENCRYPTED_AUTHENTICATED) > 0, | 109 Property.READ_ENCRYPTED_AUTHENTICATED) > 0, |
| 110 write_encrypted_authenticated: (this.info.properties & | 110 write_encrypted_authenticated: (this.info.properties & |
| 111 Property.WRITE_ENCRYPTED_AUTHENTICATED) > 0, | 111 Property.WRITE_ENCRYPTED_AUTHENTICATED) > 0, |
| 112 }); | 112 }); |
| 113 | 113 |
| 114 /** @private {!value_control.ValueControl} */ | 114 /** @private {!value_control.ValueControl} */ |
| 115 this.valueControl_ = new value_control.ValueControl(); | 115 this.valueControl_ = new value_control.ValueControl(); |
| 116 this.valueControl_.load(this.deviceAddress_, this.serviceId_, this.info); | 116 |
| 117 this.valueControl_.load({ |
| 118 deviceAddress: this.deviceAddress_, |
| 119 serviceId: this.serviceId_, |
| 120 characteristicId: this.info.id, |
| 121 properties: this.info.properties, |
| 122 }); |
| 117 this.valueControl_.setValue(this.info.last_known_value); | 123 this.valueControl_.setValue(this.info.last_known_value); |
| 118 | 124 |
| 119 /** @private {!descriptor_list.DescriptorList} */ | 125 /** @private {!descriptor_list.DescriptorList} */ |
| 120 this.descriptorList_ = new descriptor_list.DescriptorList(); | 126 this.descriptorList_ = new descriptor_list.DescriptorList(); |
| 121 | 127 |
| 122 // Create content for display in brief content container. | 128 // Create content for display in brief content container. |
| 123 var characteristicHeaderText = document.createElement('div'); | 129 var characteristicHeaderText = document.createElement('div'); |
| 124 characteristicHeaderText.textContent = 'Characteristic:'; | 130 characteristicHeaderText.textContent = 'Characteristic:'; |
| 125 | 131 |
| 126 var characteristicHeaderValue = document.createElement('div'); | 132 var characteristicHeaderValue = document.createElement('div'); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 }.bind(this)); | 240 }.bind(this)); |
| 235 }.bind(this)); | 241 }.bind(this)); |
| 236 }, | 242 }, |
| 237 }; | 243 }; |
| 238 | 244 |
| 239 return { | 245 return { |
| 240 CharacteristicList: CharacteristicList, | 246 CharacteristicList: CharacteristicList, |
| 241 CharacteristicListItem: CharacteristicListItem, | 247 CharacteristicListItem: CharacteristicListItem, |
| 242 }; | 248 }; |
| 243 }); | 249 }); |
| OLD | NEW |