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

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

Issue 2646383002: Use a new Supplement constructor for (Worker)Navigator supplements (Closed)
Patch Set: temp Created 3 years, 11 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 | « third_party/WebKit/Source/modules/nfc/NavigatorNFC.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/nfc/NavigatorNFC.cpp
diff --git a/third_party/WebKit/Source/modules/nfc/NavigatorNFC.cpp b/third_party/WebKit/Source/modules/nfc/NavigatorNFC.cpp
index 31d797426ca8f880a652d8c78b14b0f727511ead..0b0962ab07a694b94cca79a133d79b41753b2bec 100644
--- a/third_party/WebKit/Source/modules/nfc/NavigatorNFC.cpp
+++ b/third_party/WebKit/Source/modules/nfc/NavigatorNFC.cpp
@@ -9,7 +9,8 @@
namespace blink {
-NavigatorNFC::NavigatorNFC() {}
+NavigatorNFC::NavigatorNFC(Navigator& navigator)
+ : Supplement<Navigator>(navigator) {}
const char* NavigatorNFC::supplementName() {
return "NavigatorNFC";
@@ -19,7 +20,7 @@ NavigatorNFC& NavigatorNFC::from(Navigator& navigator) {
NavigatorNFC* supplement = static_cast<NavigatorNFC*>(
Supplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
- supplement = new NavigatorNFC();
+ supplement = new NavigatorNFC(navigator);
provideTo(navigator, supplementName(), supplement);
}
return *supplement;
« no previous file with comments | « third_party/WebKit/Source/modules/nfc/NavigatorNFC.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698