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..50b9b47ebbedba64bcc1a773e429a56e06d7be9c 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,19 +28,29 @@ class NFC final |
public: |
static NFC* create(LocalFrame*); |
-#if ENABLE(OILPAN) |
- ~NFC(); |
-#else |
- ~NFC() override; |
+#if !ENABLE(OILPAN) |
sof
2015/11/19 13:13:13
looks fine this way wrt 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; |
- // Implementation of PageLifecycleObserver |
+ // Implementation of PageLifecycleObserver. |
void pageVisibilityChanged() override; |
// Interface required by garbage collection. |