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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp

Issue 2736433003: Clean up web bluetooth related code (Closed)
Patch Set: clean up web bluetooth related code Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
index fcdf5d3acf0b5dedd89289e899b5c9e4d5b0bebc..26228951bf1f71469ef006ceb808f1a2a4f73a4f 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
@@ -47,7 +47,7 @@ void BluetoothRemoteGATTService::GetCharacteristicsCallback(
return;
// If the device is disconnected, reject.
- if (!device()->gatt()->RemoveFromActiveAlgorithms(resolver)) {
+ if (!m_device->gatt()->RemoveFromActiveAlgorithms(resolver)) {
resolver->reject(BluetoothError::createDOMException(
mojom::blink::WebBluetoothResult::
GATT_SERVER_DISCONNECTED_WHILE_RETRIEVING_CHARACTERISTICS));
@@ -59,7 +59,7 @@ void BluetoothRemoteGATTService::GetCharacteristicsCallback(
if (quantity == mojom::blink::WebBluetoothGATTQueryQuantity::SINGLE) {
DCHECK_EQ(1u, characteristics->size());
- resolver->resolve(device()->getOrCreateRemoteGATTCharacteristic(
+ resolver->resolve(m_device->getOrCreateRemoteGATTCharacteristic(
resolver->getExecutionContext(),
std::move(characteristics.value()[0]), this));
return;
@@ -69,7 +69,7 @@ void BluetoothRemoteGATTService::GetCharacteristicsCallback(
gattCharacteristics.reserveInitialCapacity(characteristics->size());
for (auto& characteristic : characteristics.value()) {
gattCharacteristics.push_back(
- device()->getOrCreateRemoteGATTCharacteristic(
+ m_device->getOrCreateRemoteGATTCharacteristic(
resolver->getExecutionContext(), std::move(characteristic),
this));
}
@@ -125,7 +125,7 @@ ScriptPromise BluetoothRemoteGATTService::getCharacteristicsImpl(
ScriptState* scriptState,
mojom::blink::WebBluetoothGATTQueryQuantity quantity,
const String& characteristicsUUID) {
- if (!device()->gatt()->connected()) {
+ if (!m_device->gatt()->connected()) {
return ScriptPromise::rejectWithDOMException(
scriptState,
BluetoothError::createDOMException(
@@ -133,7 +133,7 @@ ScriptPromise BluetoothRemoteGATTService::getCharacteristicsImpl(
GATT_SERVER_NOT_CONNECTED_CANNOT_RETRIEVE_CHARACTERISTICS));
}
- if (!device()->isValidService(m_service->instance_id)) {
+ if (!m_device->isValidService(m_service->instance_id)) {
return ScriptPromise::rejectWithDOMException(
scriptState, BluetoothError::createDOMException(
BluetoothErrorCode::InvalidService,
@@ -144,7 +144,7 @@ ScriptPromise BluetoothRemoteGATTService::getCharacteristicsImpl(
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
- device()->gatt()->AddToActiveAlgorithms(resolver);
+ m_device->gatt()->AddToActiveAlgorithms(resolver);
mojom::blink::WebBluetoothService* service = m_device->bluetooth()->service();
service->RemoteServiceGetCharacteristics(
« no previous file with comments | « third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698