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

Unified Diff: third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp

Issue 2649073002: Use a new Supplement constructor in Navigator supplements (part 2) (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/webshare/NavigatorShare.cpp
diff --git a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
index de92c36abf0028b0109a49d4064f66a87e07aa2c..e869ebb1864a72232c93dc5c77173e5c0d2b0d79 100644
--- a/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
+++ b/third_party/WebKit/Source/modules/webshare/NavigatorShare.cpp
@@ -64,7 +64,7 @@ NavigatorShare& NavigatorShare::from(Navigator& navigator) {
NavigatorShare* supplement = static_cast<NavigatorShare*>(
Supplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
- supplement = new NavigatorShare();
+ supplement = new NavigatorShare(navigator);
provideTo(navigator, supplementName(), supplement);
}
return *supplement;
@@ -75,7 +75,8 @@ DEFINE_TRACE(NavigatorShare) {
Supplement<Navigator>::trace(visitor);
}
-NavigatorShare::NavigatorShare() {}
+NavigatorShare::NavigatorShare(Navigator& navigator)
+ : Supplement<Navigator>(navigator) {}
const char* NavigatorShare::supplementName() {
return "NavigatorShare";
« no previous file with comments | « third_party/WebKit/Source/modules/webshare/NavigatorShare.h ('k') | third_party/WebKit/Source/modules/webusb/NavigatorUSB.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698