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

Side by Side Diff: third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.cpp

Issue 2624823002: Remove unused service instance id from bluetooth BluetoothRemoteGATTCharacteristic (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "modules/bluetooth/BluetoothDevice.h" 5 #include "modules/bluetooth/BluetoothDevice.h"
6 6
7 #include "bindings/core/v8/CallbackPromiseAdapter.h" 7 #include "bindings/core/v8/CallbackPromiseAdapter.h"
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 std::move(service), isPrimary, deviceInstanceId); 44 std::move(service), isPrimary, deviceInstanceId);
45 } 45 }
46 46
47 bool BluetoothDevice::isValidService(const String& serviceInstanceId) { 47 bool BluetoothDevice::isValidService(const String& serviceInstanceId) {
48 return m_attributeInstanceMap->containsService(serviceInstanceId); 48 return m_attributeInstanceMap->containsService(serviceInstanceId);
49 } 49 }
50 50
51 BluetoothRemoteGATTCharacteristic* 51 BluetoothRemoteGATTCharacteristic*
52 BluetoothDevice::getOrCreateRemoteGATTCharacteristic( 52 BluetoothDevice::getOrCreateRemoteGATTCharacteristic(
53 ExecutionContext* context, 53 ExecutionContext* context,
54 const String& serviceInstanceId,
55 mojom::blink::WebBluetoothRemoteGATTCharacteristicPtr characteristic, 54 mojom::blink::WebBluetoothRemoteGATTCharacteristicPtr characteristic,
56 BluetoothRemoteGATTService* service) { 55 BluetoothRemoteGATTService* service) {
57 return m_attributeInstanceMap->getOrCreateRemoteGATTCharacteristic( 56 return m_attributeInstanceMap->getOrCreateRemoteGATTCharacteristic(
58 context, serviceInstanceId, std::move(characteristic), service); 57 context, std::move(characteristic), service);
59 } 58 }
60 59
61 bool BluetoothDevice::isValidCharacteristic( 60 bool BluetoothDevice::isValidCharacteristic(
62 const String& characteristicInstanceId) { 61 const String& characteristicInstanceId) {
63 return m_attributeInstanceMap->containsCharacteristic( 62 return m_attributeInstanceMap->containsCharacteristic(
64 characteristicInstanceId); 63 characteristicInstanceId);
65 } 64 }
66 65
67 void BluetoothDevice::dispose() { 66 void BluetoothDevice::dispose() {
68 disconnectGATTIfConnected(); 67 disconnectGATTIfConnected();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 106
108 DEFINE_TRACE(BluetoothDevice) { 107 DEFINE_TRACE(BluetoothDevice) {
109 visitor->trace(m_attributeInstanceMap); 108 visitor->trace(m_attributeInstanceMap);
110 visitor->trace(m_gatt); 109 visitor->trace(m_gatt);
111 visitor->trace(m_bluetooth); 110 visitor->trace(m_bluetooth);
112 EventTargetWithInlineData::trace(visitor); 111 EventTargetWithInlineData::trace(visitor);
113 ContextLifecycleObserver::trace(visitor); 112 ContextLifecycleObserver::trace(visitor);
114 } 113 }
115 114
116 } // namespace blink 115 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698