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

Unified Diff: Source/modules/geolocation/GeolocationController.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/modules/geolocation/GeolocationController.cpp
diff --git a/Source/modules/geolocation/GeolocationController.cpp b/Source/modules/geolocation/GeolocationController.cpp
index 79a2263eb1c9145dd5e9de1d917423f58f0f80d6..09ad60a430ffbd3502f261b71ba4adf2366e2ee0 100644
--- a/Source/modules/geolocation/GeolocationController.cpp
+++ b/Source/modules/geolocation/GeolocationController.cpp
@@ -35,8 +35,8 @@
namespace WebCore {
-GeolocationController::GeolocationController(Page* page, GeolocationClient* client)
- : PageLifecycleObserver(page)
+GeolocationController::GeolocationController(Page& page, GeolocationClient* client)
+ : PageLifecycleObserver(&page)
, m_client(client)
, m_hasClientForTest(false)
, m_isClientUpdating(false)
@@ -44,7 +44,7 @@ GeolocationController::GeolocationController(Page* page, GeolocationClient* clie
{
OwnPtr<GeolocationInspectorAgent> geolocationAgent(GeolocationInspectorAgent::create(this));
m_inspectorAgent = geolocationAgent.get();
- page->inspectorController().registerModuleAgent(geolocationAgent.release());
+ page.inspectorController().registerModuleAgent(geolocationAgent.release());
}
void GeolocationController::startUpdatingIfNeeded()
@@ -71,7 +71,7 @@ GeolocationController::~GeolocationController()
m_client->geolocationDestroyed();
}
-PassOwnPtr<GeolocationController> GeolocationController::create(Page* page, GeolocationClient* client)
+PassOwnPtr<GeolocationController> GeolocationController::create(Page& page, GeolocationClient* client)
{
return adoptPtr(new GeolocationController(page, client));
}
@@ -176,7 +176,7 @@ const char* GeolocationController::supplementName()
return "GeolocationController";
}
-void provideGeolocationTo(Page* page, GeolocationClient* client)
+void provideGeolocationTo(Page& page, GeolocationClient* client)
{
Supplement<Page>::provideTo(page, GeolocationController::supplementName(), GeolocationController::create(page, client));
}

Powered by Google App Engine
This is Rietveld 408576698