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

Side by Side Diff: third_party/WebKit/Source/modules/nfc/NFC.h

Issue 2885813002: [webnfc] Align nfc.push operation with the specification (Closed)
Patch Set: Rebased to master Created 3 years, 7 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 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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/nfc/push.html ('k') | third_party/WebKit/Source/modules/nfc/NFC.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698