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

Issue 2627243002: bluetooth: Add control for reading/writing of characteristics to internals page. (Closed)

Created:
3 years, 11 months ago by mbrunson
Modified:
3 years, 11 months ago
Reviewers:
scheib, ortuno, dcheng, dpapad
CC:
Aaron Boodman, abarth-chromium, arv+watch_chromium.org, chromium-reviews, darin (slow to review), ortuno+watch_chromium.org, qsr+mojo_chromium.org, scheib+watch_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Add control for reading/writing of characteristics to internals page. Adds ValueControl to allow a user to read values from and write values to characteristics. Adds Permission enum to device.mojom for allowing reading/writing based on permissions/properties specified by the characteristic. Adds WriteValueForCharacteristic and ReadValueForCharacteristic to Device Mojo service. GIF: https://goo.gl/photos/izDvvyH7d56Uh4kE7 BUG=651282 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2627243002 Cr-Commit-Position: refs/heads/master@{#446526} Committed: https://chromium.googlesource.com/chromium/src/+/91de29301d3e16e93a3789b737a4aa44af4a0bd0

Patch Set 1 #

Patch Set 2 : Add notifications, rename functions, formatting changes #

Patch Set 3 : Make CSS variable for expandable list item border #

Patch Set 4 : Make CSS variable for expandable list item border #

Patch Set 5 : Formatting and OS check #

Patch Set 6 : Rename last_value, cleanup #

Total comments: 15

Patch Set 7 : Remove use of queue, use properties in value_control, change write value message #

Patch Set 8 : Merge upstream #

Patch Set 9 : DCHECK device #

Total comments: 14

Patch Set 10 : Add tests, tweak value control conversions #

Patch Set 11 : Add more values to GattResult, return more specific errors in Device #

Patch Set 12 : Add TODOs for enum in device.mojom #

Total comments: 6

Patch Set 13 : Add expectThrows, check thrown exceptions #

Total comments: 12

Patch Set 14 : Use enum, fix type defs #

Patch Set 15 : Use enum, fix type defs #

Patch Set 16 : Add Value class for conversions, update tests #

Patch Set 17 : Change/merge upstream, remove Permission in mojom #

Patch Set 18 : Formatting and remove permissions value from CharacteristicInfo #

Patch Set 19 : Fix comments referring to permissions #

Total comments: 16

Patch Set 20 : Move switches into Value, simplify tests #

Patch Set 21 : Fix formatting in value_control.js #

Patch Set 22 : Fix error in value input change listener #

Total comments: 6

Patch Set 23 : Remove dead code, blank line #

Patch Set 24 : Remove TypeConverter, add EnumTraits for GattResult #

Total comments: 3

Patch Set 25 : Revert "Remove TypeConverter, add EnumTraits for GattResult" #

Total comments: 3

Patch Set 26 : Merge upstream, add comment detail for type converter #

Unified diffs Side-by-side diffs Delta from patch set Stats (+757 lines, -1 line) Patch
M chrome/browser/browser_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/bluetooth_internals/bluetooth_internals.css View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/browser/resources/bluetooth_internals/bluetooth_internals.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 23 24 25 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/bluetooth_internals/characteristic_list.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 23 24 25 3 chunks +15 lines, -0 lines 0 comments Download
A chrome/browser/resources/bluetooth_internals/value_control.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +382 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 23 24 25 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/data/webui/bluetooth_internals_browsertest.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 3 chunks +135 lines, -0 lines 0 comments Download
M chrome/test/data/webui/test_api.js View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +14 lines, -0 lines 0 comments Download
M device/bluetooth/BUILD.gn View 24 1 chunk +1 line, -0 lines 0 comments Download
M device/bluetooth/device.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 23 24 25 4 chunks +27 lines, -0 lines 0 comments Download
M device/bluetooth/device.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 23 24 25 4 chunks +87 lines, -1 line 0 comments Download
M device/bluetooth/public/interfaces/device.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 23 24 25 4 chunks +26 lines, -0 lines 0 comments Download
A device/bluetooth/public/interfaces/gatt_result_type_converter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 chunk +52 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 64 (36 generated)
mbrunson
3 years, 11 months ago (2017-01-20 00:17:23 UTC) #9
ortuno
https://codereview.chromium.org/2627243002/diff/100001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/100001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode110 chrome/browser/resources/bluetooth_internals/value_control.js:110: // TODO(crbug.com/682856): Remove once permissions for characteristics on We ...
3 years, 11 months ago (2017-01-20 03:45:22 UTC) #12
mbrunson
https://codereview.chromium.org/2627243002/diff/100001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/100001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode110 chrome/browser/resources/bluetooth_internals/value_control.js:110: // TODO(crbug.com/682856): Remove once permissions for characteristics on On ...
3 years, 11 months ago (2017-01-21 01:49:01 UTC) #13
ortuno
https://codereview.chromium.org/2627243002/diff/100001/device/bluetooth/public/interfaces/device.mojom File device/bluetooth/public/interfaces/device.mojom (right): https://codereview.chromium.org/2627243002/diff/100001/device/bluetooth/public/interfaces/device.mojom#newcode58 device/bluetooth/public/interfaces/device.mojom:58: WRITE_ENCRYPTED_AUTHENTICATED = 32 On 2017/01/21 at 01:49:00, mbrunson wrote: ...
3 years, 11 months ago (2017-01-22 22:38:01 UTC) #14
mbrunson
https://codereview.chromium.org/2627243002/diff/100001/device/bluetooth/public/interfaces/device.mojom File device/bluetooth/public/interfaces/device.mojom (right): https://codereview.chromium.org/2627243002/diff/100001/device/bluetooth/public/interfaces/device.mojom#newcode58 device/bluetooth/public/interfaces/device.mojom:58: WRITE_ENCRYPTED_AUTHENTICATED = 32 On 2017/01/22 22:38:00, ortuno wrote: > ...
3 years, 11 months ago (2017-01-24 00:25:31 UTC) #15
mbrunson
dpapad: chrome/browser/browser_resources.grd chrome/browser/resources/bluetooth_internals/bluetooth_internals.css chrome/browser/resources/bluetooth_internals/bluetooth_internals.html chrome/browser/resources/bluetooth_internals/characteristic_list.js chrome/browser/resources/bluetooth_internals/value_control.js chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc chrome/test/data/webui/bluetooth_internals_browsertest.js
3 years, 11 months ago (2017-01-24 01:52:40 UTC) #17
mbrunson
dpapad: WebUI OWNERS review, please.
3 years, 11 months ago (2017-01-24 01:53:08 UTC) #18
ortuno
A couple of suggestions. lgtm https://codereview.chromium.org/2627243002/diff/220001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/220001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode184 chrome/browser/resources/bluetooth_internals/value_control.js:184: throw new Error('Expected value ...
3 years, 11 months ago (2017-01-24 02:09:17 UTC) #19
mbrunson
https://codereview.chromium.org/2627243002/diff/220001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/220001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode184 chrome/browser/resources/bluetooth_internals/value_control.js:184: throw new Error('Expected value to start with "0x".'); On ...
3 years, 11 months ago (2017-01-24 04:21:54 UTC) #20
dpapad
https://codereview.chromium.org/2627243002/diff/240001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/240001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode54 chrome/browser/resources/bluetooth_internals/value_control.js:54: this.value_ = this.convertValueToArray_(this.valueInput_.value); Why are we converting the input ...
3 years, 11 months ago (2017-01-24 19:52:30 UTC) #25
mbrunson
Mojom Review, please dcheng: device/bluetooth/public/interfaces/device.mojom device/bluetooth/public/interfaces/gatt_result_type_converter.h Also, have we come up with a replacement for ...
3 years, 11 months ago (2017-01-24 23:21:52 UTC) #29
dpapad
https://codereview.chromium.org/2627243002/diff/240001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/240001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode54 chrome/browser/resources/bluetooth_internals/value_control.js:54: this.value_ = this.convertValueToArray_(this.valueInput_.value); On 2017/01/24 at 23:21:52, mbrunson wrote: ...
3 years, 11 months ago (2017-01-24 23:54:34 UTC) #30
mbrunson
https://codereview.chromium.org/2627243002/diff/240001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/240001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode54 chrome/browser/resources/bluetooth_internals/value_control.js:54: this.value_ = this.convertValueToArray_(this.valueInput_.value); On 2017/01/24 23:54:34, dpapad wrote: > ...
3 years, 11 months ago (2017-01-25 02:43:36 UTC) #31
mbrunson
3 years, 11 months ago (2017-01-25 02:43:37 UTC) #32
dpapad
https://codereview.chromium.org/2627243002/diff/350001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/350001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode57 chrome/browser/resources/bluetooth_internals/value_control.js:57: }, ''); Can we use the reduce's initial value ...
3 years, 11 months ago (2017-01-25 19:20:07 UTC) #39
mbrunson
https://codereview.chromium.org/2627243002/diff/350001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/350001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode57 chrome/browser/resources/bluetooth_internals/value_control.js:57: }, ''); On 2017/01/25 19:20:06, dpapad wrote: > Can ...
3 years, 11 months ago (2017-01-25 22:14:44 UTC) #40
dpapad
LGTM for JS/webui https://codereview.chromium.org/2627243002/diff/410001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/410001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode80 chrome/browser/resources/bluetooth_internals/value_control.js:80: break; Since you are returning in ...
3 years, 11 months ago (2017-01-25 23:50:20 UTC) #41
dcheng
On 2017/01/24 23:21:52, mbrunson wrote: > Mojom Review, please > > dcheng: > device/bluetooth/public/interfaces/device.mojom > ...
3 years, 11 months ago (2017-01-26 04:37:04 UTC) #42
mbrunson
https://codereview.chromium.org/2627243002/diff/410001/chrome/browser/resources/bluetooth_internals/value_control.js File chrome/browser/resources/bluetooth_internals/value_control.js (right): https://codereview.chromium.org/2627243002/diff/410001/chrome/browser/resources/bluetooth_internals/value_control.js#newcode80 chrome/browser/resources/bluetooth_internals/value_control.js:80: break; On 2017/01/25 23:50:20, dpapad wrote: > Since you ...
3 years, 11 months ago (2017-01-26 19:16:26 UTC) #43
mbrunson
On 2017/01/26 04:37:04, dcheng wrote: > On 2017/01/24 23:21:52, mbrunson wrote: > > Mojom Review, ...
3 years, 11 months ago (2017-01-26 19:17:06 UTC) #44
dcheng
https://codereview.chromium.org/2627243002/diff/450001/device/bluetooth/device.cc File device/bluetooth/device.cc (right): https://codereview.chromium.org/2627243002/diff/450001/device/bluetooth/device.cc#newcode268 device/bluetooth/device.cc:268: callback.Run(GattResultTraits::ToMojom(error_code), I think you need a typemap file as ...
3 years, 11 months ago (2017-01-26 19:32:25 UTC) #45
mbrunson
https://codereview.chromium.org/2627243002/diff/450001/device/bluetooth/device.cc File device/bluetooth/device.cc (right): https://codereview.chromium.org/2627243002/diff/450001/device/bluetooth/device.cc#newcode268 device/bluetooth/device.cc:268: callback.Run(GattResultTraits::ToMojom(error_code), On 2017/01/26 19:32:25, dcheng wrote: > I think ...
3 years, 11 months ago (2017-01-26 21:27:40 UTC) #46
mbrunson
On 2017/01/26 04:37:04, dcheng wrote: > On 2017/01/24 23:21:52, mbrunson wrote: > > Mojom Review, ...
3 years, 11 months ago (2017-01-26 22:14:57 UTC) #49
dcheng
mojo lgtm, sorry for the back and forth here (I missed the fact that the ...
3 years, 11 months ago (2017-01-26 22:22:47 UTC) #52
scheib
https://codereview.chromium.org/2627243002/diff/470001/device/bluetooth/public/interfaces/gatt_result_type_converter.h File device/bluetooth/public/interfaces/gatt_result_type_converter.h (right): https://codereview.chromium.org/2627243002/diff/470001/device/bluetooth/public/interfaces/gatt_result_type_converter.h#newcode16 device/bluetooth/public/interfaces/gatt_result_type_converter.h:16: // TODO(crbug.com/666561): Replace because TypeConverter is deprecated. On 2017/01/26 ...
3 years, 11 months ago (2017-01-26 22:56:13 UTC) #55
mbrunson
https://codereview.chromium.org/2627243002/diff/470001/device/bluetooth/public/interfaces/gatt_result_type_converter.h File device/bluetooth/public/interfaces/gatt_result_type_converter.h (right): https://codereview.chromium.org/2627243002/diff/470001/device/bluetooth/public/interfaces/gatt_result_type_converter.h#newcode16 device/bluetooth/public/interfaces/gatt_result_type_converter.h:16: // TODO(crbug.com/666561): Replace because TypeConverter is deprecated. On 2017/01/26 ...
3 years, 11 months ago (2017-01-27 01:22:54 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2627243002/490001
3 years, 11 months ago (2017-01-27 01:23:39 UTC) #61
commit-bot: I haz the power
3 years, 11 months ago (2017-01-27 01:37:18 UTC) #64
Message was sent while issue was closed.
Committed patchset #26 (id:490001) as
https://chromium.googlesource.com/chromium/src/+/91de29301d3e16e93a3789b737a4...

Powered by Google App Engine
This is Rietveld 408576698