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

Unified Diff: third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.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
Index: third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.cpp
diff --git a/third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.cpp b/third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.cpp
index 5798eab04b2619a381015088b40a6ad921b66e57..c4f5f66e0a29bad301e1a362aec79e216e542c82 100644
--- a/third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/NavigatorBluetooth.cpp
@@ -13,7 +13,7 @@ NavigatorBluetooth& NavigatorBluetooth::from(Navigator& navigator) {
NavigatorBluetooth* supplement = static_cast<NavigatorBluetooth*>(
Supplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
- supplement = new NavigatorBluetooth();
+ supplement = new NavigatorBluetooth(navigator);
provideTo(navigator, supplementName(), supplement);
}
return *supplement;
@@ -34,7 +34,8 @@ DEFINE_TRACE(NavigatorBluetooth) {
Supplement<Navigator>::trace(visitor);
}
-NavigatorBluetooth::NavigatorBluetooth() {}
+NavigatorBluetooth::NavigatorBluetooth(Navigator& navigator)
+ : Supplement<Navigator>(navigator) {}
const char* NavigatorBluetooth::supplementName() {
return "NavigatorBluetooth";

Powered by Google App Engine
This is Rietveld 408576698