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

Unified Diff: Source/modules/geolocation/GeolocationController.cpp

Issue 307943002: Oilpan: Prepare moving InspectorController and InspectorAgents to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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 53458c4f325c1fa5ff7fce7e5042fa7fed214de8..e32d79034481264197baf6477ad4d8b7a4bed628 100644
--- a/Source/modules/geolocation/GeolocationController.cpp
+++ b/Source/modules/geolocation/GeolocationController.cpp
@@ -47,14 +47,14 @@ GeolocationController::GeolocationController(LocalFrame& frame, GeolocationClien
// it and this class. Until then, there's one GeolocationInspectorAgent per page that the main
// frame is responsible for creating.
if (frame.isMainFrame()) {
- OwnPtr<GeolocationInspectorAgent> geolocationAgent(GeolocationInspectorAgent::create());
+ OwnPtrWillBeRawPtr<GeolocationInspectorAgent> geolocationAgent(GeolocationInspectorAgent::create());
m_inspectorAgent = geolocationAgent.get();
frame.page()->inspectorController().registerModuleAgent(geolocationAgent.release());
} else {
m_inspectorAgent = GeolocationController::from(frame.page()->deprecatedLocalMainFrame())->m_inspectorAgent;
}
- m_inspectorAgent->AddController(this);
+ m_inspectorAgent->addController(this);
if (!frame.isMainFrame()) {
// internals.setGeolocationClientMock is per page.
@@ -88,10 +88,12 @@ GeolocationController::~GeolocationController()
void GeolocationController::detach()
{
+#if !ENABLE(OILPAN)
if (page() && m_inspectorAgent) {
- m_inspectorAgent->RemoveController(this);
- m_inspectorAgent = 0;
+ m_inspectorAgent->removeController(this);
+ m_inspectorAgent = nullptr;
}
+#endif
if (m_hasClientForTest) {
m_client->controllerForTestRemoved(this);
@@ -229,6 +231,7 @@ void GeolocationController::trace(Visitor* visitor)
visitor->trace(m_lastPosition);
visitor->trace(m_observers);
visitor->trace(m_highAccuracyObservers);
+ visitor->trace(m_inspectorAgent);
WillBeHeapSupplement<LocalFrame>::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698