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

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

Issue 2875283002: [NFC] Only connect to NFC impl if ExecutionContext supports it (Closed)
Patch Set: Rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/nfc/NFC.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9ffb2c7209e3d2fcb9d1f8574128f4cbb939723d..c9f1a4c837dac5547a989951101ec000bb9b0a46 100644
--- a/third_party/WebKit/Source/modules/nfc/NFC.h
+++ b/third_party/WebKit/Source/modules/nfc/NFC.h
@@ -65,6 +65,10 @@ class NFC final : public GarbageCollectedFinalized<NFC>,
DECLARE_VIRTUAL_TRACE();
private:
+ // Returns boolean indicating whether NFC is supported in this context. If
+ // not, |error_message| gives a message indicating why not.
+ bool IsSupportedInContext(ExecutionContext*, String& error_message);
+
// Returns promise with DOMException if feature is not supported
// or when context is not secure. Otherwise, returns empty promise.
ScriptPromise RejectIfNotSupported(ScriptState*);
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/nfc/NFC.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698