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

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

Issue 620343002: DevTools: Remove geolocation override from renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 1189472b0598b3017924e362c7b9616dd9314aff..59d1194bf79f28849bd80aad8332fa98675faff7 100644
--- a/Source/modules/geolocation/GeolocationController.cpp
+++ b/Source/modules/geolocation/GeolocationController.cpp
@@ -31,7 +31,6 @@
#include "core/page/Page.h"
#include "modules/geolocation/GeolocationClient.h"
#include "modules/geolocation/GeolocationError.h"
-#include "modules/geolocation/GeolocationInspectorAgent.h"
#include "modules/geolocation/GeolocationPosition.h"
namespace blink {
@@ -41,24 +40,7 @@ GeolocationController::GeolocationController(LocalFrame& frame, GeolocationClien
, m_client(client)
, m_hasClientForTest(false)
, m_isClientUpdating(false)
- , m_inspectorAgent(nullptr)
-{
- // FIXME: Once GeolocationInspectorAgent is per frame, there will be a 1:1 relationship between
- // it and this class. Until then, there's one GeolocationInspectorAgent per page that the main
- // frame is responsible for creating.
- if (frame.isMainFrame()) {
- OwnPtrWillBeRawPtr<GeolocationInspectorAgent> geolocationAgent(GeolocationInspectorAgent::create());
- m_inspectorAgent = geolocationAgent.get();
- frame.page()->inspectorController().registerModuleAgent(geolocationAgent.release());
- } else if (frame.page()->mainFrame()->isLocalFrame()) {
- m_inspectorAgent = GeolocationController::from(frame.page()->deprecatedLocalMainFrame())->m_inspectorAgent;
- }
-
- // m_inspectorAgent is 0 for out of process iframe instantiations, since inspector is currently unable
- // to handle that scenario.
- if (m_inspectorAgent)
- m_inspectorAgent->addController(this);
-
+{
if (!frame.isMainFrame() && frame.page()->mainFrame()->isLocalFrame()) {
// internals.setGeolocationClientMock is per page.
GeolocationController* mainController = GeolocationController::from(frame.page()->deprecatedLocalMainFrame());
@@ -87,11 +69,6 @@ GeolocationController::~GeolocationController()
{
ASSERT(m_observers.isEmpty());
#if !ENABLE(OILPAN)
- if (page() && m_inspectorAgent) {
- m_inspectorAgent->removeController(this);
- m_inspectorAgent = nullptr;
- }
-
if (m_hasClientForTest) {
m_client->controllerForTestRemoved(this);
m_hasClientForTest = false;
@@ -151,7 +128,6 @@ void GeolocationController::cancelPermissionRequest(Geolocation* geolocation)
void GeolocationController::positionChanged(GeolocationPosition* position)
{
- position = m_inspectorAgent->overrideGeolocationPosition(position);
if (!position) {
errorOccurred(GeolocationError::create(GeolocationError::PositionUnavailable, "PositionUnavailable"));
return;
@@ -214,7 +190,6 @@ 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);
}
« no previous file with comments | « Source/modules/geolocation/GeolocationController.h ('k') | Source/modules/geolocation/GeolocationInspectorAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698