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

Unified Diff: third_party/WebKit/Source/modules/presentation/NavigatorPresentation.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/presentation/NavigatorPresentation.cpp
diff --git a/third_party/WebKit/Source/modules/presentation/NavigatorPresentation.cpp b/third_party/WebKit/Source/modules/presentation/NavigatorPresentation.cpp
index a3ce1b4fd4e5c7ba2e08a79826fe221ee224539f..6a089e51ab3912a3fc37e584659a96c3f2f9faf5 100644
--- a/third_party/WebKit/Source/modules/presentation/NavigatorPresentation.cpp
+++ b/third_party/WebKit/Source/modules/presentation/NavigatorPresentation.cpp
@@ -9,7 +9,8 @@
namespace blink {
-NavigatorPresentation::NavigatorPresentation() {}
+NavigatorPresentation::NavigatorPresentation(Navigator& navigator)
+ : Supplement<Navigator>(navigator) {}
// static
const char* NavigatorPresentation::supplementName() {
@@ -21,7 +22,7 @@ NavigatorPresentation& NavigatorPresentation::from(Navigator& navigator) {
NavigatorPresentation* supplement = static_cast<NavigatorPresentation*>(
Supplement<Navigator>::from(navigator, supplementName()));
if (!supplement) {
- supplement = new NavigatorPresentation();
+ supplement = new NavigatorPresentation(navigator);
provideTo(navigator, supplementName(), supplement);
}
return *supplement;

Powered by Google App Engine
This is Rietveld 408576698