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

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

Issue 2752663002: Remove RemoteServerDisconnect() from web_bluetooth.mojom (Closed)
Patch Set: address ortuno@'s comments Created 3 years, 8 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 mojom::blink::WebBluetoothRemoteGATTDescriptorPtr descriptor, 68 mojom::blink::WebBluetoothRemoteGATTDescriptorPtr descriptor,
69 BluetoothRemoteGATTCharacteristic* characteristic) { 69 BluetoothRemoteGATTCharacteristic* characteristic) {
70 return m_attributeInstanceMap->GetOrCreateBluetoothRemoteGATTDescriptor( 70 return m_attributeInstanceMap->GetOrCreateBluetoothRemoteGATTDescriptor(
71 std::move(descriptor), characteristic); 71 std::move(descriptor), characteristic);
72 } 72 }
73 73
74 bool BluetoothDevice::IsValidDescriptor(const String& descriptorInstanceId) { 74 bool BluetoothDevice::IsValidDescriptor(const String& descriptorInstanceId) {
75 return m_attributeInstanceMap->ContainsDescriptor(descriptorInstanceId); 75 return m_attributeInstanceMap->ContainsDescriptor(descriptorInstanceId);
76 } 76 }
77 77
78 void BluetoothDevice::ClearAttributeInstanceMapAndFireEvent() { 78 void BluetoothDevice::ClearAttributeInstanceMap() {
79 m_attributeInstanceMap->Clear(); 79 m_attributeInstanceMap->Clear();
80 dispatchEvent(Event::createBubble(EventTypeNames::gattserverdisconnected));
81 } 80 }
82 81
83 const WTF::AtomicString& BluetoothDevice::interfaceName() const { 82 const WTF::AtomicString& BluetoothDevice::interfaceName() const {
84 return EventTargetNames::BluetoothDevice; 83 return EventTargetNames::BluetoothDevice;
85 } 84 }
86 85
87 ExecutionContext* BluetoothDevice::getExecutionContext() const { 86 ExecutionContext* BluetoothDevice::getExecutionContext() const {
88 return ContextLifecycleObserver::getExecutionContext(); 87 return ContextLifecycleObserver::getExecutionContext();
89 } 88 }
90 89
91 DEFINE_TRACE(BluetoothDevice) { 90 DEFINE_TRACE(BluetoothDevice) {
92 visitor->trace(m_attributeInstanceMap); 91 visitor->trace(m_attributeInstanceMap);
93 visitor->trace(m_gatt); 92 visitor->trace(m_gatt);
94 visitor->trace(m_bluetooth); 93 visitor->trace(m_bluetooth);
95 EventTargetWithInlineData::trace(visitor); 94 EventTargetWithInlineData::trace(visitor);
96 ContextLifecycleObserver::trace(visitor); 95 ContextLifecycleObserver::trace(visitor);
97 } 96 }
98 97
99 } // namespace blink 98 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698