| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef NFC_h | 5 #ifndef NFC_h |
| 6 #define NFC_h | 6 #define NFC_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptPromise.h" | 8 #include "bindings/core/v8/ScriptPromise.h" |
| 9 #include "bindings/core/v8/ScriptWrappable.h" | 9 #include "bindings/core/v8/ScriptWrappable.h" |
| 10 #include "bindings/modules/v8/StringOrArrayBufferOrNFCMessage.h" | 10 #include "bindings/modules/v8/StringOrArrayBufferOrNFCMessage.h" |
| 11 #include "core/dom/ContextLifecycleObserver.h" | 11 #include "core/dom/ContextLifecycleObserver.h" |
| 12 #include "core/page/PageVisibilityObserver.h" | 12 #include "core/page/PageVisibilityObserver.h" |
| 13 #include "device/nfc/nfc.mojom-blink.h" | 13 #include "device/nfc/nfc.mojom-blink.h" |
| 14 #include "modules/nfc/MessageCallback.h" | 14 #include "modules/nfc/MessageCallback.h" |
| 15 #include "mojo/public/cpp/bindings/binding.h" | 15 #include "mojo/public/cpp/bindings/binding.h" |
| 16 #include "wtf/HashMap.h" | 16 #include "wtf/HashMap.h" |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 | 19 |
| 20 class MessageCallback; | 20 class MessageCallback; |
| 21 class NFCError; | |
| 22 class NFCPushOptions; | 21 class NFCPushOptions; |
| 23 using NFCPushMessage = StringOrArrayBufferOrNFCMessage; | 22 using NFCPushMessage = StringOrArrayBufferOrNFCMessage; |
| 24 class NFCWatchOptions; | 23 class NFCWatchOptions; |
| 25 | 24 |
| 26 class NFC final : public GarbageCollectedFinalized<NFC>, | 25 class NFC final : public GarbageCollectedFinalized<NFC>, |
| 27 public ScriptWrappable, | 26 public ScriptWrappable, |
| 28 public PageVisibilityObserver, | 27 public PageVisibilityObserver, |
| 29 public ContextLifecycleObserver, | 28 public ContextLifecycleObserver, |
| 30 public device::nfc::mojom::blink::NFCClient { | 29 public device::nfc::mojom::blink::NFCClient { |
| 31 DEFINE_WRAPPERTYPEINFO(); | 30 DEFINE_WRAPPERTYPEINFO(); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 device::nfc::mojom::blink::NFCPtr m_nfc; | 86 device::nfc::mojom::blink::NFCPtr m_nfc; |
| 88 mojo::Binding<device::nfc::mojom::blink::NFCClient> m_client; | 87 mojo::Binding<device::nfc::mojom::blink::NFCClient> m_client; |
| 89 HeapHashSet<Member<ScriptPromiseResolver>> m_requests; | 88 HeapHashSet<Member<ScriptPromiseResolver>> m_requests; |
| 90 using WatchCallbacksMap = HeapHashMap<uint32_t, Member<MessageCallback>>; | 89 using WatchCallbacksMap = HeapHashMap<uint32_t, Member<MessageCallback>>; |
| 91 WatchCallbacksMap m_callbacks; | 90 WatchCallbacksMap m_callbacks; |
| 92 }; | 91 }; |
| 93 | 92 |
| 94 } // namespace blink | 93 } // namespace blink |
| 95 | 94 |
| 96 #endif // NFC_h | 95 #endif // NFC_h |
| OLD | NEW |