summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--WebCore/page/Geolocation.cpp16
-rw-r--r--WebCore/page/Geolocation.h4
2 files changed, 20 insertions, 0 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 8abf417..36e14f6 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -398,6 +398,22 @@ void Geolocation::clearWatch(int watchId)
stopUpdating();
}
+void Geolocation::suspend()
+{
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
+ if (hasListeners())
+ m_service->suspend();
+#endif
+}
+
+void Geolocation::resume()
+{
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
+ if (hasListeners())
+ m_service->resume();
+#endif
+}
+
void Geolocation::setIsAllowed(bool allowed)
{
// This may be due to either a new position from the service, or a cached
diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h
index b4e5bef..ba4f149 100644
--- a/WebCore/page/Geolocation.h
+++ b/WebCore/page/Geolocation.h
@@ -66,6 +66,10 @@ public:
int watchPosition(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
void clearWatch(int watchId);
+ // These methods are used by Android.
+ void suspend();
+ void resume();
+
void setIsAllowed(bool);
Frame* frame() const { return m_frame; }