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

Issue 2142813003: bluetooth: Avoid including non-blink mojo bindings in blink code (Closed)

Created:
4 years, 5 months ago by ortuno
Modified:
4 years, 5 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, mlamouri+watch-content_chromium.org, ortuno+watch_chromium.org, scheib+watch_chromium.org, wolenetz
Base URL:
https://chromium.googlesource.com/chromium/src.git@my-origin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

bluetooth: Avoid including non-blink mojo bindings in blink code Blink should only use the blink variant of mojo bindings. Unfortunately, this means we can no longer use the same enum across content/renderer and blink. To get around this, the embedder interface (WebBluetooth) uses int32 instead of the enums and we cast to enum where appropriate. Also removes unnecessary dependencies on mojo bindings. BUG=610415 Committed: https://crrev.com/4928ab440dfc16789b8ec0d9c52717b78a41abb8 Cr-Commit-Position: refs/heads/master@{#405531}

Patch Set 1 #

Patch Set 2 : Clean up #

Patch Set 3 : git diff #

Patch Set 4 : Forgot a file #

Patch Set 5 : Include enums instead #

Patch Set 6 : Include enums #

Patch Set 7 : Go back to static cast #

Total comments: 25

Patch Set 8 : Remove dependencies on non-blink bindings #

Patch Set 9 : Address jyasskin's comments #

Patch Set 10 : Add DCHECK for enum #

Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -91 lines) Patch
M content/common/DEPS View 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/bluetooth/web_bluetooth_impl.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -2 lines 0 comments Download
M content/renderer/bluetooth/web_bluetooth_impl.cc View 1 2 3 4 5 6 7 8 9 10 chunks +27 lines, -12 lines 0 comments Download
M device/vr/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +0 lines, -2 lines 0 comments Download
M media/blink/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothError.h View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothError.cpp View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.cpp View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h View 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp View 1 2 3 4 5 6 7 8 6 chunks +12 lines, -12 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.h View 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp View 1 2 3 4 5 6 7 8 5 chunks +10 lines, -10 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 2 3 4 5 6 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/platform/modules/bluetooth/WebBluetooth.h View 1 2 3 4 5 6 7 8 3 chunks +9 lines, -11 lines 0 comments Download
D third_party/WebKit/public/platform/modules/bluetooth/WebBluetoothError.h View 1 chunk +0 lines, -21 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 68 (47 generated)
ortuno
jyasskin: PTAL. Having blink code that includes non-blink mojo bindings cause problems when these mojo ...
4 years, 5 months ago (2016-07-13 17:35:31 UTC) #22
Jeffrey Yasskin
I'm really sad that we're losing our type information, but lgtm with the comments. https://codereview.chromium.org/2142813003/diff/120001/content/renderer/bluetooth/web_bluetooth_impl.cc ...
4 years, 5 months ago (2016-07-13 20:34:59 UTC) #29
ortuno
Me too :( I was hoping to avoid this until we Onion Soup Web Bluetooth. ...
4 years, 5 months ago (2016-07-13 22:47:29 UTC) #34
Jeffrey Yasskin
LGTM https://codereview.chromium.org/2142813003/diff/120001/content/renderer/bluetooth/web_bluetooth_impl.cc File content/renderer/bluetooth/web_bluetooth_impl.cc (right): https://codereview.chromium.org/2142813003/diff/120001/content/renderer/bluetooth/web_bluetooth_impl.cc#newcode98 content/renderer/bluetooth/web_bluetooth_impl.cc:98: static_cast<blink::mojom::WebBluetoothGATTQueryQuantity>(quantity), On 2016/07/13 22:47:28, ortuno wrote: > On ...
4 years, 5 months ago (2016-07-13 22:56:14 UTC) #35
ortuno
Thanks! https://codereview.chromium.org/2142813003/diff/120001/content/renderer/bluetooth/web_bluetooth_impl.cc File content/renderer/bluetooth/web_bluetooth_impl.cc (right): https://codereview.chromium.org/2142813003/diff/120001/content/renderer/bluetooth/web_bluetooth_impl.cc#newcode98 content/renderer/bluetooth/web_bluetooth_impl.cc:98: static_cast<blink::mojom::WebBluetoothGATTQueryQuantity>(quantity), On 2016/07/13 at 22:56:14, Jeffrey Yasskin wrote: ...
4 years, 5 months ago (2016-07-13 23:12:40 UTC) #36
ortuno
haraken: third_party/WebKit/Source/modules/BUILD.gn jbroman: t/WebKit/public/BUILD.gn & blink_headers.gypi avi: content/common/DEPS bajones: device/vr/BUILD.gn wolenetz: media/blink/BUILD.gn
4 years, 5 months ago (2016-07-13 23:24:23 UTC) #38
Avi (use Gerrit)
souping lgtm
4 years, 5 months ago (2016-07-13 23:42:05 UTC) #42
bajones
Device/VR LGTM
4 years, 5 months ago (2016-07-14 00:44:24 UTC) #43
haraken
modules/ LGTM
4 years, 5 months ago (2016-07-14 00:58:53 UTC) #44
jbroman
okay, lgtm
4 years, 5 months ago (2016-07-14 15:09:51 UTC) #47
wolenetz
redirecting the media/blink mojo binding change review to sandersd@
4 years, 5 months ago (2016-07-14 17:46:00 UTC) #49
sandersd (OOO until July 31)
On 2016/07/14 17:46:00, wolenetz wrote: > redirecting the media/blink mojo binding change review to sandersd@ ...
4 years, 5 months ago (2016-07-14 17:52:14 UTC) #52
ortuno
Thanks all!
4 years, 5 months ago (2016-07-14 17:56:39 UTC) #54
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/2142813003/180001
4 years, 5 months ago (2016-07-14 17:57:03 UTC) #56
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/218238)
4 years, 5 months ago (2016-07-14 18:07:16 UTC) #58
ortuno
esprehn: owner's review for third_party/WebKit/public/BUILD.gn and blink_headers please.
4 years, 5 months ago (2016-07-14 18:20:00 UTC) #60
esprehn
lgtm
4 years, 5 months ago (2016-07-14 18:26:29 UTC) #61
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/2142813003/180001
4 years, 5 months ago (2016-07-14 19:05:33 UTC) #63
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years, 5 months ago (2016-07-14 19:11:33 UTC) #65
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-14 19:12:00 UTC) #66
commit-bot: I haz the power
4 years, 5 months ago (2016-07-14 19:12:52 UTC) #68
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/4928ab440dfc16789b8ec0d9c52717b78a41abb8
Cr-Commit-Position: refs/heads/master@{#405531}

Powered by Google App Engine
This is Rietveld 408576698