OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef FakeBluetoothChooserEvent_h |
| 6 #define FakeBluetoothChooserEvent_h |
| 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "modules/bluetooth/FakeLEPeripheral.h" |
| 11 #include "platform/heap/Handle.h" |
| 12 |
| 13 namespace blink { |
| 14 |
| 15 class FakeLEPeripheral; |
| 16 |
| 17 class FakeBluetoothChooserEvent final |
| 18 : public GarbageCollectedFinalized<FakeBluetoothChooserEvent>, |
| 19 public ScriptWrappable { |
| 20 DEFINE_WRAPPERTYPEINFO(); |
| 21 |
| 22 public: |
| 23 static FakeBluetoothChooserEvent* create() { |
| 24 return new FakeBluetoothChooserEvent( |
| 25 "discovering", |
| 26 "https://www.example.com", |
| 27 nullptr); |
| 28 } |
| 29 |
| 30 String type() { return m_type; } |
| 31 String domain() { return m_domain; } |
| 32 FakeLEPeripheral* peripheral() { return m_peripheral; } |
| 33 |
| 34 DECLARE_VIRTUAL_TRACE(); |
| 35 |
| 36 private: |
| 37 FakeBluetoothChooserEvent(String type, String domain, FakeLEPeripheral*); |
| 38 |
| 39 const String m_type; |
| 40 const String m_domain; |
| 41 Member<FakeLEPeripheral> m_peripheral; |
| 42 }; |
| 43 |
| 44 } // namespace blink |
| 45 #endif |
OLD | NEW |