diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_advertising_event.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-c30a6232df03e1efbd9f3b226777b07e087a1122.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_advertising_event.cc')
-rw-r--r-- | chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_advertising_event.cc | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_advertising_event.cc b/chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_advertising_event.cc index 11449f590ab..e26586d55af 100644 --- a/chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_advertising_event.cc +++ b/chromium/third_party/blink/renderer/modules/bluetooth/bluetooth_advertising_event.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "third_party/blink/renderer/modules/bluetooth/bluetooth_advertising_event.h" + #include "third_party/blink/renderer/bindings/modules/v8/string_or_unsigned_long.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_bluetooth_advertising_event_init.h" #include "third_party/blink/renderer/core/dom/dom_exception.h" @@ -29,26 +30,27 @@ BluetoothAdvertisingEvent::BluetoothAdvertisingEvent( BluetoothAdvertisingEvent::BluetoothAdvertisingEvent( const AtomicString& event_type, BluetoothDevice* device, - const String& name, - const HeapVector<StringOrUnsignedLong>& uuids, - base::Optional<uint16_t> appearance, - base::Optional<int8_t> txPower, - base::Optional<int8_t> rssi, - BluetoothManufacturerDataMap* manufacturerData, - BluetoothServiceDataMap* serviceData) + mojom::blink::WebBluetoothAdvertisingEventPtr advertising_event) : Event(event_type, Bubbles::kYes, Cancelable::kYes), device_(std::move(device)), - name_(name), - uuids_(uuids), - appearance_(appearance), - txPower_(txPower), - rssi_(rssi), - manufacturer_data_map_(manufacturerData), - service_data_map_(serviceData) {} + name_(advertising_event->name), + appearance_(advertising_event->appearance), + txPower_(advertising_event->tx_power), + rssi_(advertising_event->rssi), + manufacturer_data_map_(MakeGarbageCollected<BluetoothManufacturerDataMap>( + advertising_event->manufacturer_data)), + service_data_map_(MakeGarbageCollected<BluetoothServiceDataMap>( + advertising_event->service_data)) { + for (const String& uuid : advertising_event->uuids) { + StringOrUnsignedLong value; + value.SetString(uuid); + uuids_.push_back(value); + } +} // namespace blink BluetoothAdvertisingEvent::~BluetoothAdvertisingEvent() {} -void BluetoothAdvertisingEvent::Trace(Visitor* visitor) { +void BluetoothAdvertisingEvent::Trace(Visitor* visitor) const { visitor->Trace(device_); visitor->Trace(uuids_); visitor->Trace(manufacturer_data_map_); |