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

Unified Diff: Source/core/page/DOMWindowPagePopup.cpp

Issue 171333003: Pass implementation object to supplemental classes by reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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: Source/core/page/DOMWindowPagePopup.cpp
diff --git a/Source/core/page/DOMWindowPagePopup.cpp b/Source/core/page/DOMWindowPagePopup.cpp
index 348c5895ea6f74f514dfb7b319d3386741a9f5c4..beea8d9c248fcbc94252aca9a8567fc3b3348a04 100644
--- a/Source/core/page/DOMWindowPagePopup.cpp
+++ b/Source/core/page/DOMWindowPagePopup.cpp
@@ -52,24 +52,22 @@ const char* DOMWindowPagePopup::supplementName()
return "DOMWindowPagePopup";
}
-PagePopupController* DOMWindowPagePopup::pagePopupController(DOMWindow* window)
+PagePopupController* DOMWindowPagePopup::pagePopupController(DOMWindow& window)
{
- DOMWindowPagePopup* supplement = static_cast<DOMWindowPagePopup*>(from(window, supplementName()));
+ DOMWindowPagePopup* supplement = static_cast<DOMWindowPagePopup*>(from(&window, supplementName()));
ASSERT(supplement);
return supplement->m_controller.get();
}
-void DOMWindowPagePopup::install(DOMWindow* window, PagePopupClient* popupClient)
+void DOMWindowPagePopup::install(DOMWindow& window, PagePopupClient* popupClient)
{
- ASSERT(window);
ASSERT(popupClient);
provideTo(window, supplementName(), adoptPtr(new DOMWindowPagePopup(popupClient)));
}
-void DOMWindowPagePopup::uninstall(DOMWindow* window)
+void DOMWindowPagePopup::uninstall(DOMWindow& window)
{
- ASSERT(window);
- window->removeSupplement(supplementName());
+ window.removeSupplement(supplementName());
}
}

Powered by Google App Engine
This is Rietveld 408576698