From 2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Mon, 7 May 2012 11:21:11 +0200 Subject: Imported WebKit commit 7e538425aa020340619e927792f3d895061fb54b (http://svn.webkit.org/repository/webkit/trunk@116286) --- .../WebProcess/Geolocation/WebGeolocationManager.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp') diff --git a/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp b/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp index cee8e0bac..2b976763f 100644 --- a/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp +++ b/Source/WebKit2/WebProcess/Geolocation/WebGeolocationManager.cpp @@ -29,14 +29,11 @@ #include "WebGeolocationManagerProxyMessages.h" #include "WebPage.h" #include "WebProcess.h" - -#if ENABLE(CLIENT_BASED_GEOLOCATION) #include #include #include #include #include -#endif using namespace WebCore; @@ -58,29 +55,25 @@ void WebGeolocationManager::didReceiveMessage(CoreIPC::Connection* connection, C void WebGeolocationManager::registerWebPage(WebPage* page) { -#if ENABLE(CLIENT_BASED_GEOLOCATION) bool wasEmpty = m_pageSet.isEmpty(); m_pageSet.add(page); if (wasEmpty) m_process->connection()->send(Messages::WebGeolocationManagerProxy::StartUpdating(), 0); -#endif } void WebGeolocationManager::unregisterWebPage(WebPage* page) { -#if ENABLE(CLIENT_BASED_GEOLOCATION) m_pageSet.remove(page); if (m_pageSet.isEmpty()) m_process->connection()->send(Messages::WebGeolocationManagerProxy::StopUpdating(), 0); -#endif } void WebGeolocationManager::didChangePosition(const WebGeolocationPosition::Data& data) { -#if ENABLE(CLIENT_BASED_GEOLOCATION) +#if ENABLE(GEOLOCATION) RefPtr position = GeolocationPosition::create(data.timestamp, data.latitude, data.longitude, data.accuracy); HashSet::const_iterator it = m_pageSet.begin(); @@ -88,14 +81,14 @@ void WebGeolocationManager::didChangePosition(const WebGeolocationPosition::Data for (; it != end; ++it) { WebPage* page = *it; if (page->corePage()) - page->corePage()->geolocationController()->positionChanged(position.get()); + GeolocationController::from(page->corePage())->positionChanged(position.get()); } -#endif +#endif // ENABLE(GEOLOCATION) } void WebGeolocationManager::didFailToDeterminePosition() { -#if ENABLE(CLIENT_BASED_GEOLOCATION) +#if ENABLE(GEOLOCATION) // FIXME: Add localized error string. RefPtr error = GeolocationError::create(GeolocationError::PositionUnavailable, /* Localized error string */ String("")); @@ -104,9 +97,9 @@ void WebGeolocationManager::didFailToDeterminePosition() for (; it != end; ++it) { WebPage* page = *it; if (page->corePage()) - page->corePage()->geolocationController()->errorOccurred(error.get()); + GeolocationController::from(page->corePage())->errorOccurred(error.get()); } -#endif +#endif // ENABLE(GEOLOCATION) } } // namespace WebKit -- cgit v1.2.1