Changeset 243409 in webkit
- Timestamp:
- Mar 23, 2019 3:37:41 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 2 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r243285 r243409 1 2019-03-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Remove build time dependency on Geoclue2 4 https://bugs.webkit.org/show_bug.cgi?id=195994 5 6 Reviewed by Michael Catanzaro. 7 8 Remove USE_GEOCLUE build option. 9 10 * Source/cmake/FindGeoClue2.cmake: Removed. 11 * Source/cmake/OptionsGTK.cmake: 12 1 13 2019-03-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r243404 r243409 1 2019-03-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Remove build time dependency on Geoclue2 4 https://bugs.webkit.org/show_bug.cgi?id=195994 5 6 Reviewed by Michael Catanzaro. 7 8 Remove old Geoclue implementation. 9 10 * PlatformGTK.cmake: 11 * SourcesGTK.txt: 12 * platform/geoclue/GeolocationProviderGeoclue.cpp: Removed. 13 * platform/geoclue/GeolocationProviderGeoclue.h: Removed. 14 * platform/geoclue/GeolocationProviderGeoclueClient.h: Removed. 15 1 16 2019-03-22 Eric Carlson <eric.carlson@apple.com> 2 17 -
trunk/Source/WebCore/PlatformGTK.cmake
r243285 r243409 22 22 "${WEBCORE_DIR}/page/gtk" 23 23 "${WEBCORE_DIR}/platform/generic" 24 "${WEBCORE_DIR}/platform/geoclue"25 24 "${WEBCORE_DIR}/platform/gtk" 26 25 "${WEBCORE_DIR}/platform/graphics/egl" … … 75 74 rendering/RenderThemeGtk.cpp 76 75 ) 77 78 if (USE_GEOCLUE)79 list(APPEND WebCore_SOURCES80 ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c81 )82 execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable dbus_interface geoclue-2.0 OUTPUT_VARIABLE GEOCLUE_DBUS_INTERFACE)83 add_custom_command(84 OUTPUT ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.h85 COMMAND gdbus-codegen --interface-prefix org.freedesktop.GeoClue2. --c-namespace Geoclue --generate-c-code ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface ${GEOCLUE_DBUS_INTERFACE}86 )87 set_source_files_properties(${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c PROPERTIES COMPILE_FLAGS -Wno-unused-parameter)88 endif ()89 76 90 77 list(APPEND WebCore_USER_AGENT_STYLE_SHEETS -
trunk/Source/WebCore/SourcesGTK.txt
r239667 r243409 62 62 platform/generic/ScrollAnimatorGeneric.cpp 63 63 64 platform/geoclue/GeolocationProviderGeoclue.cpp65 66 64 platform/graphics/GLContext.cpp @no-unify 67 65 platform/graphics/GraphicsContext3DPrivate.cpp -
trunk/Source/WebCore/platform/gtk/po/ChangeLog
r243285 r243409 1 2019-03-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Remove build time dependency on Geoclue2 4 https://bugs.webkit.org/show_bug.cgi?id=195994 5 6 Reviewed by Michael Catanzaro. 7 8 * POTFILES.in: Add GeoclueGeolocationProvider.cpp. 9 1 10 2019-03-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 11 -
trunk/Source/WebCore/platform/gtk/po/POTFILES.in
r243285 r243409 38 38 ../../../WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp 39 39 ../../../WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp 40 ../../../WebKit/UIProcess/geoclue/GeoclueGeolocationProvider.cpp 40 41 ../../../WebKit/UIProcess/gtk/WebColorPickerGtk.cpp 41 42 ../../../WebKit/UIProcess/gtk/WebKitInspectorWindow.cpp -
trunk/Source/WebKit/ChangeLog
r243407 r243409 1 2019-03-23 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Remove build time dependency on Geoclue2 4 https://bugs.webkit.org/show_bug.cgi?id=195994 5 6 Reviewed by Michael Catanzaro. 7 8 Add GeoclueGeolocationProvider class to provide geolocation position updates using Geoclue2 DBus service. 9 10 * PlatformGTK.cmake: 11 * PlatformWPE.cmake: 12 * SourcesGTK.txt: 13 * SourcesWPE.txt: 14 * UIProcess/API/glib/WebKitGeolocationManager.cpp: 15 (_WebKitGeolocationPosition::_WebKitGeolocationPosition): 16 (webkitGeolocationManagerStop): 17 (webkitGeolocationManagerSetEnableHighAccuracy): 18 (webkitGeolocationManagerDispose): 19 (webkit_geolocation_manager_class_init): 20 * UIProcess/geoclue/GeoclueGeolocationProvider.cpp: Added. 21 (WebKit::GeoclueGeolocationProvider::GeoclueGeolocationProvider): 22 (WebKit::GeoclueGeolocationProvider::~GeoclueGeolocationProvider): 23 (WebKit::GeoclueGeolocationProvider::start): 24 (WebKit::GeoclueGeolocationProvider::stop): 25 (WebKit::GeoclueGeolocationProvider::setEnableHighAccuracy): 26 (WebKit::GeoclueGeolocationProvider::destroyManagerLater): 27 (WebKit::GeoclueGeolocationProvider::destroyManager): 28 (WebKit::GeoclueGeolocationProvider::setupManager): 29 (WebKit::GeoclueGeolocationProvider::createClient): 30 (WebKit::GeoclueGeolocationProvider::setupClient): 31 (WebKit::GeoclueGeolocationProvider::startClient): 32 (WebKit::GeoclueGeolocationProvider::stopClient): 33 (WebKit::GeoclueGeolocationProvider::requestAccuracyLevel): 34 (WebKit::GeoclueGeolocationProvider::clientLocationUpdatedCallback): 35 (WebKit::GeoclueGeolocationProvider::createLocation): 36 (WebKit::GeoclueGeolocationProvider::locationUpdated): 37 (WebKit::GeoclueGeolocationProvider::didFail): 38 * UIProcess/geoclue/GeoclueGeolocationProvider.h: Added. 39 1 40 2019-03-22 Simon Fraser <simon.fraser@apple.com> 2 41 -
trunk/Source/WebKit/PlatformGTK.cmake
r243285 r243409 398 398 "${WEBKIT_DIR}/UIProcess/Network/CustomProtocols/soup" 399 399 "${WEBKIT_DIR}/UIProcess/Plugins/gtk" 400 "${WEBKIT_DIR}/UIProcess/geoclue" 400 401 "${WEBKIT_DIR}/UIProcess/glib" 401 402 "${WEBKIT_DIR}/UIProcess/gstreamer" -
trunk/Source/WebKit/PlatformWPE.cmake
r243285 r243409 258 258 "${WEBKIT_DIR}/UIProcess/CoordinatedGraphics" 259 259 "${WEBKIT_DIR}/UIProcess/Network/CustomProtocols/soup" 260 "${WEBKIT_DIR}/UIProcess/geoclue" 260 261 "${WEBKIT_DIR}/UIProcess/gstreamer" 261 262 "${WEBKIT_DIR}/UIProcess/linux" -
trunk/Source/WebKit/SourcesGTK.txt
r243285 r243409 209 209 210 210 UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp 211 212 UIProcess/geoclue/GeoclueGeolocationProvider.cpp 211 213 212 214 UIProcess/Launcher/glib/ProcessLauncherGLib.cpp @no-unify -
trunk/Source/WebKit/SourcesWPE.txt
r243285 r243409 184 184 UIProcess/CoordinatedGraphics/DrawingAreaProxyCoordinatedGraphics.cpp 185 185 186 UIProcess/geoclue/GeoclueGeolocationProvider.cpp 187 186 188 UIProcess/glib/WebProcessPoolGLib.cpp 187 189 UIProcess/glib/WebProcessProxyGLib.cpp -
trunk/Source/WebKit/UIProcess/API/glib/WebKitGeolocationManager.cpp
r243285 r243409 22 22 23 23 #include "APIGeolocationProvider.h" 24 #include "GeoclueGeolocationProvider.h" 24 25 #include "WebGeolocationPosition.h" 25 26 #include "WebKitGeolocationManagerPrivate.h" … … 27 28 #include <wtf/WallTime.h> 28 29 #include <wtf/glib/WTFGType.h> 29 30 #if USE(GEOCLUE)31 #include <WebCore/GeolocationProviderGeoclue.h>32 #include <WebCore/GeolocationProviderGeoclueClient.h>33 #endif34 30 35 31 using namespace WebKit; … … 67 63 _WebKitGeolocationPosition() = default; 68 64 69 _WebKitGeolocationPosition(double latitude, double longitude, double accuracy , Optional<double> timestamp = WTF::nullopt)70 { 71 position.timestamp = timestamp.valueOr(WallTime::now().secondsSinceEpoch().value());65 _WebKitGeolocationPosition(double latitude, double longitude, double accuracy) 66 { 67 position.timestamp = WallTime::now().secondsSinceEpoch().value(); 72 68 position.latitude = latitude; 73 69 position.longitude = longitude; 74 70 position.accuracy = accuracy; 71 } 72 73 explicit _WebKitGeolocationPosition(GeolocationPosition&& corePosition) 74 : position(WTFMove(corePosition)) 75 { 75 76 } 76 77 … … 229 230 } 230 231 231 #if USE(GEOCLUE)232 class GeoclueProviderClient final : public GeolocationProviderGeoclueClient {233 public:234 explicit GeoclueProviderClient(WebKitGeolocationManager* manager)235 : m_manager(manager)236 {237 }238 239 private:240 void notifyPositionChanged(int timestamp, double latitude, double longitude, double altitude, double accuracy, double) override241 {242 WebKitGeolocationPosition position(latitude, longitude, accuracy, static_cast<double>(timestamp));243 webkit_geolocation_position_set_altitude(&position, altitude);244 webkit_gelocation_manager_update_position(m_manager, &position);245 }246 247 void notifyErrorOccurred(const char* message) override248 {249 webkit_gelocation_manager_failed(m_manager, message);250 }251 252 WebKitGeolocationManager* m_manager;253 };254 #endif255 256 232 struct _WebKitGeolocationManagerPrivate { 257 233 RefPtr<WebGeolocationManagerProxy> manager; 258 234 bool highAccuracyEnabled; 259 #if USE(GEOCLUE) 260 std::unique_ptr<GeoclueProviderClient> providerClient; 261 std::unique_ptr<GeolocationProviderGeoclue> provider; 262 #endif 235 std::unique_ptr<GeoclueGeolocationProvider> geoclueProvider; 263 236 }; 264 237 … … 272 245 g_signal_emit(manager, signals[START], 0, &returnValue); 273 246 if (returnValue) { 274 #if USE(GEOCLUE) 275 manager->priv->provider = nullptr; 276 manager->priv->providerClient = nullptr; 277 #endif 247 manager->priv->geoclueProvider = nullptr; 278 248 return; 279 249 } 280 250 281 #if USE(GEOCLUE) 282 if (!manager->priv->provider) { 283 manager->priv->providerClient = std::make_unique<GeoclueProviderClient>(manager); 284 manager->priv->provider = std::make_unique<GeolocationProviderGeoclue>(manager->priv->providerClient.get()); 285 } 286 manager->priv->provider->startUpdating(); 287 #endif 251 if (!manager->priv->geoclueProvider) { 252 manager->priv->geoclueProvider = std::make_unique<GeoclueGeolocationProvider>(); 253 manager->priv->geoclueProvider->setEnableHighAccuracy(manager->priv->highAccuracyEnabled); 254 } 255 manager->priv->geoclueProvider->start([manager](GeolocationPosition&& corePosition, Optional<CString> error) { 256 if (error) { 257 webkit_gelocation_manager_failed(manager, error->data()); 258 return; 259 } 260 261 WebKitGeolocationPosition position(WTFMove(corePosition)); 262 webkit_gelocation_manager_update_position(manager, &position); 263 }); 288 264 } 289 265 … … 292 268 g_signal_emit(manager, signals[STOP], 0, nullptr); 293 269 294 #if USE(GEOCLUE) 295 if (manager->priv->provider) 296 manager->priv->provider->stopUpdating(); 297 #endif 270 if (manager->priv->geoclueProvider) 271 manager->priv->geoclueProvider->stop(); 298 272 } 299 273 … … 305 279 manager->priv->highAccuracyEnabled = enabled; 306 280 g_object_notify(G_OBJECT(manager), "enable-high-accuracy"); 307 #if USE(GEOCLUE) 308 if (manager->priv->provider) 309 manager->priv->provider->setEnableHighAccuracy(enabled); 310 #endif 281 if (manager->priv->geoclueProvider) 282 manager->priv->geoclueProvider->setEnableHighAccuracy(enabled); 311 283 } 312 284 -
trunk/Source/cmake/OptionsGTK.cmake
r243285 r243409 81 81 WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ${GTK3_SUPPORTS_X11}) 82 82 WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ${GTK3_SUPPORTS_WAYLAND}) 83 WEBKIT_OPTION_DEFINE(USE_GEOCLUE "Whether to enable default geolocation implementation using GeoClue2" PUBLIC ON)84 83 WEBKIT_OPTION_DEFINE(USE_LIBNOTIFY "Whether to enable the default web notification implementation." PUBLIC ON) 85 84 WEBKIT_OPTION_DEFINE(USE_LIBHYPHEN "Whether to enable the default automatic hyphenation implementation." PUBLIC ON) … … 220 219 if (NOT LIBSECRET_FOUND) 221 220 message(FATAL_ERROR "libsecret is needed for USE_LIBSECRET") 222 endif ()223 endif ()224 225 if (USE_GEOCLUE)226 find_package(GeoClue2 2.1.5)227 if (NOT GEOCLUE2_FOUND)228 message(FATAL_ERROR "Geoclue is needed for USE_GEOCLUE.")229 221 endif () 230 222 endif ()
Note: See TracChangeset
for help on using the changeset viewer.