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

Unified Diff: third_party/WebKit/Source/modules/nfc/NFC.cpp

Issue 1444303002: [webnfc] Align NFC interface with latest specification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes for review comments from Kenneth Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/nfc/NFC.cpp
diff --git a/third_party/WebKit/Source/modules/nfc/NFC.cpp b/third_party/WebKit/Source/modules/nfc/NFC.cpp
index ffd1cf76206f5c9254ad3843bf97b853ab103571..1f935e50c71843fda0112a89fa984b293ab30f16 100644
--- a/third_party/WebKit/Source/modules/nfc/NFC.cpp
+++ b/third_party/WebKit/Source/modules/nfc/NFC.cpp
@@ -8,6 +8,8 @@
#include "bindings/core/v8/ScriptPromiseResolver.h"
#include "core/dom/DOMException.h"
#include "core/dom/ExceptionCode.h"
+#include "modules/nfc/NFCMessage.h"
+#include "modules/nfc/NFCPushOptions.h"
namespace blink {
@@ -23,13 +25,33 @@ NFC* NFC::create(LocalFrame* frame)
return nfc;
}
-NFC::~NFC()
+ScriptPromise NFC::push(ScriptState* scriptState, const NFCPushMessage& records, const NFCPushOptions& options)
{
+ // TODO(shalamov): To be implemented.
+ return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
+}
+
+ScriptPromise NFC::cancelPush(ScriptState* scriptState, const String& target)
+{
+ // TODO(shalamov): To be implemented.
+ return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
+}
+
+ScriptPromise NFC::watch(ScriptState* scriptState, MessageCallback* callback, const NFCWatchOptions& options)
+{
+ // TODO(shalamov): To be implemented.
+ return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
}
-ScriptPromise NFC::requestAdapter(ScriptState* scriptState)
+ScriptPromise NFC::cancelWatch(ScriptState* scriptState, long id)
{
- // TODO(riju): To be implemented.
+ // TODO(shalamov): To be implemented.
+ return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
+}
+
+ScriptPromise NFC::cancelWatch(ScriptState* scriptState)
+{
+ // TODO(shalamov): To be implemented.
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(NotSupportedError));
}

Powered by Google App Engine
This is Rietveld 408576698