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/modules/v8/StringOrArrayBufferOrNFCMessage.h" | 9 #include "bindings/modules/v8/StringOrArrayBufferOrNFCMessage.h" |
10 #include "core/dom/ContextLifecycleObserver.h" | 10 #include "core/dom/ContextLifecycleObserver.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 75 |
76 void OnRequestCompleted(ScriptPromiseResolver*, | 76 void OnRequestCompleted(ScriptPromiseResolver*, |
77 device::mojom::blink::NFCErrorPtr); | 77 device::mojom::blink::NFCErrorPtr); |
78 void OnConnectionError(); | 78 void OnConnectionError(); |
79 void OnWatchRegistered(MessageCallback*, | 79 void OnWatchRegistered(MessageCallback*, |
80 ScriptPromiseResolver*, | 80 ScriptPromiseResolver*, |
81 uint32_t id, | 81 uint32_t id, |
82 device::mojom::blink::NFCErrorPtr); | 82 device::mojom::blink::NFCErrorPtr); |
83 | 83 |
84 // device::mojom::blink::NFCClient implementation. | 84 // device::mojom::blink::NFCClient implementation. |
85 void OnWatch(const WTF::Vector<uint32_t>& ids, | 85 void OnWatch(const Vector<uint32_t>& ids, |
86 device::mojom::blink::NFCMessagePtr) override; | 86 device::mojom::blink::NFCMessagePtr) override; |
87 | 87 |
88 private: | 88 private: |
89 explicit NFC(LocalFrame*); | 89 explicit NFC(LocalFrame*); |
90 device::mojom::blink::NFCPtr nfc_; | 90 device::mojom::blink::NFCPtr nfc_; |
91 mojo::Binding<device::mojom::blink::NFCClient> client_; | 91 mojo::Binding<device::mojom::blink::NFCClient> client_; |
92 HeapHashSet<Member<ScriptPromiseResolver>> requests_; | 92 HeapHashSet<Member<ScriptPromiseResolver>> requests_; |
93 using WatchCallbacksMap = HeapHashMap<uint32_t, Member<MessageCallback>>; | 93 using WatchCallbacksMap = HeapHashMap<uint32_t, Member<MessageCallback>>; |
94 WatchCallbacksMap callbacks_; | 94 WatchCallbacksMap callbacks_; |
95 }; | 95 }; |
96 | 96 |
97 } // namespace blink | 97 } // namespace blink |
98 | 98 |
99 #endif // NFC_h | 99 #endif // NFC_h |
OLD | NEW |