Marks remaining Android-specific changes to Geolocation with ANDROID
Change-Id: I23e2ef2ec23b340e0bfe8bbf0e71e2c675fda676
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index ad5f8d6..6085b32 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -29,9 +29,13 @@
#include "Geolocation.h"
#include "Chrome.h"
+// ANDROID
#include "DOMWindow.h"
+// END ANDROID
#include "Document.h"
+// ANDROID
#include "EventNames.h"
+// END ANDROID
#include "Frame.h"
#include "Page.h"
#include "PlatformBridge.h"
@@ -203,8 +207,10 @@
}
Geolocation::Geolocation(Frame* frame)
+// ANDROID
: EventListener(GeolocationEventListenerType)
, m_frame(frame)
+// END ANDROID
#if !ENABLE(CLIENT_BASED_GEOLOCATION)
, m_service(GeolocationService::create(this))
#endif
@@ -217,14 +223,18 @@
ASSERT(m_frame->document());
m_frame->document()->setUsingGeolocation(true);
+// ANDROID
if (m_frame->domWindow())
m_frame->domWindow()->addEventListener(eventNames().unloadEvent, this, false);
+// END ANDROID
}
Geolocation::~Geolocation()
{
+// ANDROID
if (m_frame && m_frame->domWindow())
m_frame->domWindow()->removeEventListener(eventNames().unloadEvent, this, false);
+// END ANDROID
}
void Geolocation::disconnectFrame()
@@ -676,6 +686,7 @@
}
+// ANDROID
bool Geolocation::operator==(const EventListener& listener)
{
if (listener.type() != GeolocationEventListenerType)
@@ -693,5 +704,6 @@
m_oneShots.clear();
m_watchers.clear();
}
+// END ANDROID
} // namespace WebCore
diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h
index 2a282b5..b30deac 100644
--- a/WebCore/page/Geolocation.h
+++ b/WebCore/page/Geolocation.h
@@ -27,7 +27,9 @@
#ifndef Geolocation_h
#define Geolocation_h
+// ANDROID
#include "EventListener.h"
+// END ANDROID
#include "GeolocationPositionCache.h"
#include "GeolocationService.h"
#include "Geoposition.h"
@@ -54,7 +56,9 @@
class GeolocationError;
#endif
+// ANDROID
class Geolocation : public EventListener
+// END ANDROID
#if !ENABLE(CLIENT_BASED_GEOLOCATION)
, public GeolocationServiceClient
#endif
@@ -156,9 +160,11 @@
PassRefPtr<GeoNotifier> startRequest(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
+// ANDROID
// EventListener
virtual bool operator==(const EventListener&);
virtual void handleEvent(ScriptExecutionContext*, Event*);
+// END ANDROID
void fatalErrorOccurred(GeoNotifier*);
void requestTimedOut(GeoNotifier*);