summaryrefslogtreecommitdiffstats
path: root/WebCore/page/Geolocation.cpp
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-05-21 16:53:46 +0100
committerKristian Monsen <kristianm@google.com>2010-05-25 10:24:15 +0100
commit6c2af9490927c3c5959b5cb07461b646f8b32f6c (patch)
treef7111b9b22befab472616c1d50ec94eb50f1ec8c /WebCore/page/Geolocation.cpp
parenta149172322a9067c14e8b474a53e63649aa17cad (diff)
downloadexternal_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.zip
external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.gz
external_webkit-6c2af9490927c3c5959b5cb07461b646f8b32f6c.tar.bz2
Merge WebKit at r59636: Initial merge by git
Change-Id: I59b289c4e6b18425f06ce41cc9d34c522515de91
Diffstat (limited to 'WebCore/page/Geolocation.cpp')
-rw-r--r--WebCore/page/Geolocation.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index 49a4d84..96fe564 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -239,8 +239,6 @@ void Geolocation::disconnectFrame()
Geoposition* Geolocation::lastPosition()
{
- ASSERT(isAllowed());
-
#if ENABLE(CLIENT_BASED_GEOLOCATION)
if (!m_frame)
return 0;
@@ -532,24 +530,24 @@ void Geolocation::requestPermission()
if (!m_frame)
return;
-
+
Page* page = m_frame->page();
if (!page)
return;
-
+
m_allowGeolocation = InProgress;
// Ask the chrome: it maintains the geolocation challenge policy itself.
page->chrome()->requestGeolocationPermissionForFrame(m_frame, this);
}
-void Geolocation::positionChanged(PassRefPtr<Geoposition> newPosition)
+void Geolocation::positionChangedInternal()
{
- m_positionCache->setCachedPosition(newPosition.get());
+ m_positionCache->setCachedPosition(lastPosition());
// Stop all currently running timers.
stopTimers();
-
+
if (!isAllowed()) {
// requestPermission() will ask the chrome for permission. This may be
// implemented synchronously or asynchronously. In both cases,
@@ -587,9 +585,9 @@ void Geolocation::makeSuccessCallbacks()
#if ENABLE(CLIENT_BASED_GEOLOCATION)
-void Geolocation::setPosition(GeolocationPosition* position)
+void Geolocation::positionChanged()
{
- positionChanged(createGeoposition(position));
+ positionChangedInternal();
}
void Geolocation::setError(GeolocationError* error)
@@ -605,7 +603,7 @@ void Geolocation::geolocationServicePositionChanged(GeolocationService* service)
ASSERT_UNUSED(service, service == m_service);
ASSERT(m_service->lastPosition());
- positionChanged(m_service->lastPosition());
+ positionChangedInternal();
}
void Geolocation::geolocationServiceErrorOccurred(GeolocationService* service)