| Index: third_party/WebKit/Source/modules/nfc/NFC.h
|
| diff --git a/third_party/WebKit/Source/modules/nfc/NFC.h b/third_party/WebKit/Source/modules/nfc/NFC.h
|
| index ffb5845f9b79791f3c2b1c69fa38e1f93f44830b..eed546e4a49c31e6f35c2c1c5650d27792e4930b 100644
|
| --- a/third_party/WebKit/Source/modules/nfc/NFC.h
|
| +++ b/third_party/WebKit/Source/modules/nfc/NFC.h
|
| @@ -7,11 +7,17 @@
|
|
|
| #include "bindings/core/v8/ScriptPromise.h"
|
| #include "bindings/core/v8/ScriptWrappable.h"
|
| +#include "bindings/modules/v8/UnionTypesModules.h"
|
| #include "core/frame/LocalFrameLifecycleObserver.h"
|
| #include "core/page/PageLifecycleObserver.h"
|
|
|
| namespace blink {
|
|
|
| +class MessageCallback;
|
| +class NFCPushOptions;
|
| +using NFCPushMessage = StringOrArrayBufferOrNFCMessage;
|
| +class NFCWatchOptions;
|
| +
|
| class NFC final
|
| : public GarbageCollectedFinalized<NFC>
|
| , public ScriptWrappable
|
| @@ -22,14 +28,24 @@ class NFC final
|
|
|
| public:
|
| static NFC* create(LocalFrame*);
|
| -#if ENABLE(OILPAN)
|
| - ~NFC();
|
| -#else
|
| - ~NFC() override;
|
| +#if !ENABLE(OILPAN)
|
| + ~NFC() override = default;
|
| #endif
|
|
|
| - // Get an adapter object providing NFC functionality.
|
| - ScriptPromise requestAdapter(ScriptState*);
|
| + // Pushes NFCPushMessage asynchronously to NFC tag / peer.
|
| + ScriptPromise push(ScriptState*, const NFCPushMessage&, const NFCPushOptions&);
|
| +
|
| + // Cancels ongoing push operation.
|
| + ScriptPromise cancelPush(ScriptState*, const String&);
|
| +
|
| + // Starts watching for NFC messages that match NFCWatchOptions criteria.
|
| + ScriptPromise watch(ScriptState*, MessageCallback*, const NFCWatchOptions&);
|
| +
|
| + // Cancels watch operation with id
|
| + ScriptPromise cancelWatch(ScriptState*, long id);
|
| +
|
| + // Cancels all watch operations
|
| + ScriptPromise cancelWatch(ScriptState*);
|
|
|
| // Implementation of LocalFrameLifecycleObserver.
|
| void willDetachFrameHost() override;
|
|
|