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

Unified Diff: chrome/browser/resources/bluetooth_internals/characteristic_list.js

Issue 2627243002: bluetooth: Add control for reading/writing of characteristics to internals page. (Closed)
Patch Set: Merge upstream, add comment detail for type converter Created 3 years, 11 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/browser/resources/bluetooth_internals/characteristic_list.js
diff --git a/chrome/browser/resources/bluetooth_internals/characteristic_list.js b/chrome/browser/resources/bluetooth_internals/characteristic_list.js
index 937b3d7142941f4679e006b2b9b7ce067aac3ef2..7fb7708e975a2728bbe57f89e2e6165282b309af 100644
--- a/chrome/browser/resources/bluetooth_internals/characteristic_list.js
+++ b/chrome/browser/resources/bluetooth_internals/characteristic_list.js
@@ -111,6 +111,11 @@ cr.define('characteristic_list', function() {
Property.WRITE_ENCRYPTED_AUTHENTICATED) > 0,
});
+ /** @private {!value_control.ValueControl} */
+ this.valueControl_ = new value_control.ValueControl();
+ this.valueControl_.load(this.deviceAddress_, this.serviceId_, this.info);
+ this.valueControl_.setValue(this.info.last_known_value);
+
/** @private {!descriptor_list.DescriptorList} */
this.descriptorList_ = new descriptor_list.DescriptorList();
@@ -146,10 +151,16 @@ cr.define('characteristic_list', function() {
var infoDiv = document.createElement('div');
infoDiv.classList.add('info-container');
+
+ var valueHeader = document.createElement('h4');
+ valueHeader.textContent = 'Value';
+
infoDiv.appendChild(characteristicInfoHeader);
infoDiv.appendChild(characteristicDiv);
infoDiv.appendChild(propertiesHeader);
infoDiv.appendChild(propertiesDiv);
+ infoDiv.appendChild(valueHeader);
+ infoDiv.appendChild(this.valueControl_);
infoDiv.appendChild(descriptorsHeader);
infoDiv.appendChild(this.descriptorList_);
@@ -176,6 +187,10 @@ cr.define('characteristic_list', function() {
decorate: function() {
ExpandableList.prototype.decorate.call(this);
+ /** @private {?string} */
+ this.deviceAddress_ = null;
+ /** @private {?string} */
+ this.serviceId_ = null;
/** @private {boolean} */
this.characteristicsRequested_ = false;

Powered by Google App Engine
This is Rietveld 408576698