⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243285 in webkit


Ignore:
Timestamp:
Mar 21, 2019, 3:10:35 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK][WPE] Add API to provide geolocation information
https://bugs.webkit.org/show_bug.cgi?id=195940

Reviewed by Michael Catanzaro.

.:

Build with geolocation enabled by default in both GTK and WPE. In GTK add a specific USE_GEOCLUE build option
instead of using ENABLE_GEOLOCATION.

  • Source/cmake/OptionsGTK.cmake:
  • Source/cmake/OptionsWPE.cmake:

Source/WebCore:

Replace ENABLE(GEOLOCATION) with USE(GEOCLUE).

  • PlatformGTK.cmake:
  • platform/geoclue/GeolocationProviderGeoclue.cpp:
  • platform/geoclue/GeolocationProviderGeoclue.h:
  • platform/geoclue/GeolocationProviderGeoclueClient.h:

Source/WebCore/platform/gtk/po:

  • POTFILES.in: Add WebKitGeolocationManager.cpp.

Source/WebKit:

Add WebKitGeolocationManager public class to handle geolocation position updates. WebKitGeolocationProvider has
been removed and the default implementation based on GeoClue is done by WebKitGeolocationManager.

  • PlatformGTK.cmake:
  • PlatformWPE.cmake:
  • SourcesGTK.txt:
  • SourcesWPE.txt:
  • UIProcess/API/glib/WebKitGeolocationManager.cpp: Added.

(_WebKitGeolocationPosition::_WebKitGeolocationPosition):
(webkit_geolocation_position_new):
(webkit_geolocation_position_copy):
(webkit_geolocation_position_free):
(webkit_geolocation_position_set_timestamp):
(webkit_geolocation_position_set_altitude):
(webkit_geolocation_position_set_altitude_accuracy):
(webkit_geolocation_position_set_heading):
(webkit_geolocation_position_set_speed):
(webkitGeolocationManagerStop):
(webkitGeolocationManagerSetEnableHighAccuracy):
(webkitGeolocationManagerCreate):
(webkitGeolocationManagerGetProperty):
(webkit_geolocation_manager_class_init):
(webkit_gelocation_manager_update_position):
(webkit_gelocation_manager_failed):
(webkit_geolocation_manager_get_enable_high_accuracy):

  • UIProcess/API/glib/WebKitGeolocationManagerPrivate.h: Copied from Source/WebCore/platform/geoclue/GeolocationProviderGeoclueClient.h.
  • UIProcess/API/glib/WebKitGeolocationProvider.cpp: Removed.
  • UIProcess/API/glib/WebKitGeolocationProvider.h: Removed.
  • UIProcess/API/glib/WebKitWebContext.cpp:

(webkitWebContextConstructed): Create a WebKitGeolocationManager instead of a WebKitGeolocationProvider.
(webkit_web_context_get_geolocation_manager): Get the WebKitGeolocationManager.

  • UIProcess/API/gtk/WebKitGeolocationManager.h: Added.
  • UIProcess/API/gtk/WebKitWebContext.h:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
  • UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
  • UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
  • UIProcess/API/gtk/webkit2.h:
  • UIProcess/API/wpe/WebKitGeolocationManager.h: Added.
  • UIProcess/API/wpe/WebKitWebContext.h:
  • UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
  • UIProcess/API/wpe/docs/wpe-docs.sgml:
  • UIProcess/API/wpe/webkit.h:

Tools:

Add a new test to check the new API.

  • TestWebKitAPI/Tests/WebKitGLib/TestGeolocationManager.cpp: Added.

(testGeolocationManagerCurrentPosition):
(testGeolocationManagerWatchPosition):
(beforeAll):
(afterAll):

  • TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:

(testWebViewGeolocationPermissionRequests): Stop using ENABLE(GEOLOCATION) conditionals for geolocation tests.
(beforeAll): Ditto.

  • TestWebKitAPI/glib/CMakeLists.txt:
Location:
trunk
Files:
4 added
2 deleted
28 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r243275 r243285  
     12019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][WPE] Add API to provide geolocation information
     4        https://bugs.webkit.org/show_bug.cgi?id=195940
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Build with geolocation enabled by default in both GTK and WPE. In GTK add a specific USE_GEOCLUE build option
     9        instead of using ENABLE_GEOLOCATION.
     10
     11        * Source/cmake/OptionsGTK.cmake:
     12        * Source/cmake/OptionsWPE.cmake:
     13
    1142019-03-20  Simon Fraser  <simon.fraser@apple.com>
    215
  • trunk/Source/WebCore/ChangeLog

    r243284 r243285  
     12019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][WPE] Add API to provide geolocation information
     4        https://bugs.webkit.org/show_bug.cgi?id=195940
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Replace ENABLE(GEOLOCATION) with USE(GEOCLUE).
     9
     10        * PlatformGTK.cmake:
     11        * platform/geoclue/GeolocationProviderGeoclue.cpp:
     12        * platform/geoclue/GeolocationProviderGeoclue.h:
     13        * platform/geoclue/GeolocationProviderGeoclueClient.h:
     14
    1152019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
    216
  • trunk/Source/WebCore/PlatformGTK.cmake

    r238675 r243285  
    7676)
    7777
    78 if (ENABLE_GEOLOCATION)
     78if (USE_GEOCLUE)
    7979    list(APPEND WebCore_SOURCES
    8080        ${DERIVED_SOURCES_WEBCORE_DIR}/Geoclue2Interface.c
  • trunk/Source/WebCore/platform/geoclue/GeolocationProviderGeoclue.cpp

    r235115 r243285  
    2727#include "GeolocationProviderGeoclue.h"
    2828
    29 #if ENABLE(GEOLOCATION)
     29#if USE(GEOCLUE)
    3030
    3131#include <wtf/glib/GLibUtilities.h>
     
    213213} // namespace WebCore
    214214
    215 #endif // ENABLE(GEOLOCATION)
     215#endif // USE(GEOCLUE)
  • trunk/Source/WebCore/platform/geoclue/GeolocationProviderGeoclue.h

    r220515 r243285  
    1919 */
    2020
    21 #ifndef GeolocationProviderGeoclue_h
    22 #define GeolocationProviderGeoclue_h
     21#pragma once
    2322
    24 #if ENABLE(GEOLOCATION)
     23#if USE(GEOCLUE)
    2524
    2625#include "GeolocationProviderGeoclueClient.h"
     
    7271} // namespace WebCore
    7372
    74 #endif // ENABLE(GEOLOCATION)
    75 
    76 #endif // GeolocationProviderGeoclue_h
     73#endif // USE(GEOCLUE)
  • trunk/Source/WebCore/platform/geoclue/GeolocationProviderGeoclueClient.h

    r119249 r243285  
    1818 */
    1919
    20 #ifndef GeolocationProviderGeoclueClient_h
    21 #define GeolocationProviderGeoclueClient_h
     20#pragma once
    2221
    23 #if ENABLE(GEOLOCATION)
     22#if USE(GEOCLUE)
    2423
    2524namespace WebCore {
     
    3332} // namespace WebCore
    3433
    35 #endif // ENABLE(GEOLOCATION)
    36 
    37 #endif // GeolocationProviderGeoclueClient_h
     34#endif // USE(GEOCLUE)
  • trunk/Source/WebCore/platform/gtk/po/ChangeLog

    r242863 r243285  
     12019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][WPE] Add API to provide geolocation information
     4        https://bugs.webkit.org/show_bug.cgi?id=195940
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        * POTFILES.in: Add WebKitGeolocationManager.cpp.
     9
    1102019-03-13  Milo Casagrande <milo@milo.name>
    211
  • trunk/Source/WebCore/platform/gtk/po/POTFILES.in

    r242348 r243285  
    1717../../../WebKit/UIProcess/API/glib/WebKitFileChooserRequest.cpp
    1818../../../WebKit/UIProcess/API/glib/WebKitFindController.cpp
     19../../../WebKit/UIProcess/API/glib/WebKitGeolocationManager.cpp
    1920../../../WebKit/UIProcess/API/glib/WebKitNavigationPolicyDecision.cpp
    2021../../../WebKit/UIProcess/API/glib/WebKitNotification.cpp
  • trunk/Source/WebKit/ChangeLog

    r243276 r243285  
     12019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][WPE] Add API to provide geolocation information
     4        https://bugs.webkit.org/show_bug.cgi?id=195940
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Add WebKitGeolocationManager public class to handle geolocation position updates. WebKitGeolocationProvider has
     9        been removed and the default implementation based on GeoClue is done by WebKitGeolocationManager.
     10
     11        * PlatformGTK.cmake:
     12        * PlatformWPE.cmake:
     13        * SourcesGTK.txt:
     14        * SourcesWPE.txt:
     15        * UIProcess/API/glib/WebKitGeolocationManager.cpp: Added.
     16        (_WebKitGeolocationPosition::_WebKitGeolocationPosition):
     17        (webkit_geolocation_position_new):
     18        (webkit_geolocation_position_copy):
     19        (webkit_geolocation_position_free):
     20        (webkit_geolocation_position_set_timestamp):
     21        (webkit_geolocation_position_set_altitude):
     22        (webkit_geolocation_position_set_altitude_accuracy):
     23        (webkit_geolocation_position_set_heading):
     24        (webkit_geolocation_position_set_speed):
     25        (webkitGeolocationManagerStop):
     26        (webkitGeolocationManagerSetEnableHighAccuracy):
     27        (webkitGeolocationManagerCreate):
     28        (webkitGeolocationManagerGetProperty):
     29        (webkit_geolocation_manager_class_init):
     30        (webkit_gelocation_manager_update_position):
     31        (webkit_gelocation_manager_failed):
     32        (webkit_geolocation_manager_get_enable_high_accuracy):
     33        * UIProcess/API/glib/WebKitGeolocationManagerPrivate.h: Copied from Source/WebCore/platform/geoclue/GeolocationProviderGeoclueClient.h.
     34        * UIProcess/API/glib/WebKitGeolocationProvider.cpp: Removed.
     35        * UIProcess/API/glib/WebKitGeolocationProvider.h: Removed.
     36        * UIProcess/API/glib/WebKitWebContext.cpp:
     37        (webkitWebContextConstructed): Create a WebKitGeolocationManager instead of a WebKitGeolocationProvider.
     38        (webkit_web_context_get_geolocation_manager): Get the WebKitGeolocationManager.
     39        * UIProcess/API/gtk/WebKitGeolocationManager.h: Added.
     40        * UIProcess/API/gtk/WebKitWebContext.h:
     41        * UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt:
     42        * UIProcess/API/gtk/docs/webkit2gtk-4.0.types:
     43        * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
     44        * UIProcess/API/gtk/webkit2.h:
     45        * UIProcess/API/wpe/WebKitGeolocationManager.h: Added.
     46        * UIProcess/API/wpe/WebKitWebContext.h:
     47        * UIProcess/API/wpe/docs/wpe-0.1-sections.txt:
     48        * UIProcess/API/wpe/docs/wpe-docs.sgml:
     49        * UIProcess/API/wpe/webkit.h:
     50
    1512019-03-20  Youenn Fablet  <youenn@apple.com>
    252
  • trunk/Source/WebKit/PlatformGTK.cmake

    r242346 r243285  
    8383    ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitFormSubmissionRequest.h
    8484    ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitForwardDeclarations.h
     85    ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitGeolocationManager.h
    8586    ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h
    8687    ${WEBKIT_DIR}/UIProcess/API/gtk/WebKitHitTestResult.h
  • trunk/Source/WebKit/PlatformWPE.cmake

    r242709 r243285  
    114114    ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitFindController.h
    115115    ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitFormSubmissionRequest.h
     116    ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitGeolocationManager.h
    116117    ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitGeolocationPermissionRequest.h
    117118    ${WEBKIT_DIR}/UIProcess/API/wpe/WebKitHitTestResult.h
  • trunk/Source/WebKit/SourcesGTK.txt

    r242346 r243285  
    147147UIProcess/API/glib/WebKitFormClient.cpp @no-unify
    148148UIProcess/API/glib/WebKitFormSubmissionRequest.cpp @no-unify
     149UIProcess/API/glib/WebKitGeolocationManager.cpp @no-unify
    149150UIProcess/API/glib/WebKitGeolocationPermissionRequest.cpp @no-unify
    150 UIProcess/API/glib/WebKitGeolocationProvider.cpp @no-unify
    151151UIProcess/API/glib/WebKitIconLoadingClient.cpp @no-unify
    152152UIProcess/API/glib/WebKitInjectedBundleClient.cpp @no-unify
  • trunk/Source/WebKit/SourcesWPE.txt

    r242346 r243285  
    132132UIProcess/API/glib/WebKitFormClient.cpp @no-unify
    133133UIProcess/API/glib/WebKitFormSubmissionRequest.cpp @no-unify
     134UIProcess/API/glib/WebKitGeolocationManager.cpp @no-unify
    134135UIProcess/API/glib/WebKitGeolocationPermissionRequest.cpp @no-unify
    135 UIProcess/API/glib/WebKitGeolocationProvider.cpp @no-unify
    136136UIProcess/API/glib/WebKitInjectedBundleClient.cpp @no-unify
    137137UIProcess/API/glib/WebKitInstallMissingMediaPluginsPermissionRequest.cpp @no-unify
  • trunk/Source/WebKit/UIProcess/API/glib/WebKitGeolocationManagerPrivate.h

    r243284 r243285  
    11/*
    2  * Copyright (C) 2012 Igalia S.L.
     2 * Copyright (C) 2019 Igalia S.L.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    1818 */
    1919
    20 #ifndef GeolocationProviderGeoclueClient_h
    21 #define GeolocationProviderGeoclueClient_h
     20#pragma once
    2221
    23 #if ENABLE(GEOLOCATION)
     22#include "WebGeolocationManagerProxy.h"
     23#include "WebKitGeolocationManager.h"
    2424
    25 namespace WebCore {
    26 
    27 class GeolocationProviderGeoclueClient {
    28 public:
    29     virtual void notifyPositionChanged(int timestamp, double latitude, double longitude, double altitude, double accuracy, double altitudeAccuracy) = 0;
    30     virtual void notifyErrorOccurred(const char* message) = 0;
    31 };
    32 
    33 } // namespace WebCore
    34 
    35 #endif // ENABLE(GEOLOCATION)
    36 
    37 #endif // GeolocationProviderGeoclueClient_h
     25WebKitGeolocationManager* webkitGeolocationManagerCreate(WebKit::WebGeolocationManagerProxy*);
  • trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp

    r243110 r243285  
    3232#include "WebAutomationSession.h"
    3333#include "WebCertificateInfo.h"
    34 #include "WebGeolocationManagerProxy.h"
    3534#include "WebKitAutomationSessionPrivate.h"
    3635#include "WebKitCustomProtocolManagerClient.h"
     
    3837#include "WebKitDownloadPrivate.h"
    3938#include "WebKitFaviconDatabasePrivate.h"
    40 #include "WebKitGeolocationProvider.h"
     39#include "WebKitGeolocationManagerPrivate.h"
    4140#include "WebKitInjectedBundleClient.h"
    4241#include "WebKitNetworkProxySettingsPrivate.h"
     
    171170    URISchemeHandlerMap uriSchemeHandlers;
    172171    URISchemeRequestMap uriSchemeRequests;
    173 #if ENABLE(GEOLOCATION)
    174     std::unique_ptr<WebKitGeolocationProvider> geolocationProvider;
    175 #endif
     172    GRefPtr<WebKitGeolocationManager> geolocationManager;
    176173    std::unique_ptr<WebKitNotificationProvider> notificationProvider;
    177174    GRefPtr<WebKitWebsiteDataManager> websiteDataManager;
     
    368365    attachCustomProtocolManagerClientToContext(webContext);
    369366
    370 #if ENABLE(GEOLOCATION)
    371     priv->geolocationProvider = std::make_unique<WebKitGeolocationProvider>(priv->processPool->supplement<WebGeolocationManagerProxy>());
    372 #endif
     367    priv->geolocationManager = adoptGRef(webkitGeolocationManagerCreate(priv->processPool->supplement<WebGeolocationManagerProxy>()));
    373368    priv->notificationProvider = std::make_unique<WebKitNotificationProvider>(priv->processPool->supplement<WebNotificationManagerProxy>(), webContext);
    374369#if PLATFORM(GTK) && ENABLE(REMOTE_INSPECTOR)
     
    868863}
    869864
     865/**
     866 * webkit_web_context_get_geolocation_manager:
     867 * @context: a #WebKitWebContext
     868 *
     869 * Get the #WebKitGeolocationManager of @context.
     870 *
     871 * Returns: (transfer none): the #WebKitGeolocationManager of @context.
     872 *
     873 * Since: 2.26
     874 */
     875WebKitGeolocationManager* webkit_web_context_get_geolocation_manager(WebKitWebContext* context)
     876{
     877    g_return_val_if_fail(WEBKIT_IS_WEB_CONTEXT(context), nullptr);
     878
     879    return context->priv->geolocationManager.get();
     880}
     881
    870882static void ensureFaviconDatabase(WebKitWebContext* context)
    871883{
  • trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebContext.h

    r240473 r243285  
    3131#include <webkit2/WebKitDownload.h>
    3232#include <webkit2/WebKitFaviconDatabase.h>
     33#include <webkit2/WebKitGeolocationManager.h>
    3334#include <webkit2/WebKitNetworkProxySettings.h>
    3435#include <webkit2/WebKitSecurityManager.h>
     
    215216webkit_web_context_get_cookie_manager               (WebKitWebContext              *context);
    216217
     218WEBKIT_API WebKitGeolocationManager *
     219webkit_web_context_get_geolocation_manager          (WebKitWebContext              *context);
     220
    217221WEBKIT_API WebKitFaviconDatabase *
    218222webkit_web_context_get_favicon_database             (WebKitWebContext              *context);
  • trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-4.0-sections.txt

    r241790 r243285  
    4545webkit_web_context_download_uri
    4646webkit_web_context_get_cookie_manager
     47webkit_web_context_get_geolocation_manager
    4748webkit_web_context_get_favicon_database
    4849webkit_web_context_set_favicon_database_directory
     
    14951496
    14961497<SECTION>
     1498<FILE>WebKitGeolocationManager</FILE>
     1499WebKitGeolocationManager
     1500webkit_gelocation_manager_update_position
     1501webkit_gelocation_manager_failed
     1502webkit_geolocation_manager_get_enable_high_accuracy
     1503
     1504<SUBSECTION Position>
     1505WebKitGeolocationPosition
     1506webkit_geolocation_position_new
     1507webkit_geolocation_position_copy
     1508webkit_geolocation_position_free
     1509webkit_geolocation_position_set_timestamp
     1510webkit_geolocation_position_set_altitude
     1511webkit_geolocation_position_set_altitude_accuracy
     1512webkit_geolocation_position_set_heading
     1513webkit_geolocation_position_set_speed
     1514
     1515<SUBSECTION Private>
     1516WebKitGeolocationManagerPrivate
     1517webkit_geolocation_manager_get_type
     1518webkit_geolocation_position_get_type
     1519
     1520<SUBSECTION Standard>
     1521WebKitGeolocationManagerClass
     1522WEBKIT_TYPE_GEOLOCATION_MANAGER
     1523WEBKIT_GEOLOCATION_MANAGER
     1524WEBKIT_IS_GEOLOCATION_MANAGER
     1525WEBKIT_GEOLOCATION_MANAGER_CLASS
     1526WEBKIT_IS_GEOLOCATION_MANAGER_CLASS
     1527WEBKIT_GEOLOCATION_MANAGER_GET_CLASS
     1528WEBKIT_TYPE_GEOLOCATION_POSITION
     1529</SECTION>
     1530
     1531<SECTION>
    14971532<FILE>WebKitWebExtension</FILE>
    14981533WebKitWebExtension
  • trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-4.0.types

    r241936 r243285  
    4141webkit_option_menu_item_get_type
    4242webkit_device_info_permission_request_get_type
     43webkit_geolocation_manager_get_type
     44webkit_geolocation_position_get_type
  • trunk/Source/WebKit/UIProcess/API/gtk/docs/webkit2gtk-docs.sgml

    r241936 r243285  
    6363    <xi:include href="xml/WebKitAutomationSession.xml"/>
    6464    <xi:include href="xml/WebKitApplicationInfo.xml"/>
     65    <xi:include href="xml/WebKitGeolocationManager.xml"/>
    6566  </chapter>
    6667
     
    150151  </index>
    151152
     153  <index id="api-index-2-26" role="2.26">
     154    <title>Index of new symbols in 2.26</title>
     155    <xi:include href="xml/api-index-2.26.xml"><xi:fallback /></xi:include>
     156  </index>
     157
    152158  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
    153159</book>
  • trunk/Source/WebKit/UIProcess/API/gtk/webkit2.h

    r241790 r243285  
    5050#include <webkit2/WebKitFindController.h>
    5151#include <webkit2/WebKitFormSubmissionRequest.h>
     52#include <webkit2/WebKitGeolocationManager.h>
    5253#include <webkit2/WebKitGeolocationPermissionRequest.h>
    5354#include <webkit2/WebKitHitTestResult.h>
  • trunk/Source/WebKit/UIProcess/API/wpe/WebKitWebContext.h

    r240473 r243285  
    3131#include <wpe/WebKitDownload.h>
    3232#include <wpe/WebKitFaviconDatabase.h>
     33#include <wpe/WebKitGeolocationManager.h>
    3334#include <wpe/WebKitNetworkProxySettings.h>
    3435#include <wpe/WebKitSecurityManager.h>
     
    215216webkit_web_context_get_cookie_manager               (WebKitWebContext              *context);
    216217
     218WEBKIT_API WebKitGeolocationManager *
     219webkit_web_context_get_geolocation_manager          (WebKitWebContext              *context);
     220
    217221WEBKIT_API WebKitFaviconDatabase *
    218222webkit_web_context_get_favicon_database             (WebKitWebContext              *context);
  • trunk/Source/WebKit/UIProcess/API/wpe/docs/wpe-1.0-sections.txt

    r243073 r243285  
    2323webkit_web_context_download_uri
    2424webkit_web_context_get_cookie_manager
     25webkit_web_context_get_geolocation_manager
    2526webkit_web_context_get_favicon_database
    2627webkit_web_context_set_favicon_database_directory
     
    13691370
    13701371<SECTION>
     1372<FILE>WebKitGeolocationManager</FILE>
     1373WebKitGeolocationManager
     1374webkit_gelocation_manager_update_position
     1375webkit_gelocation_manager_failed
     1376webkit_geolocation_manager_get_enable_high_accuracy
     1377
     1378<SUBSECTION Position>
     1379WebKitGeolocationPosition
     1380webkit_geolocation_position_new
     1381webkit_geolocation_position_copy
     1382webkit_geolocation_position_free
     1383webkit_geolocation_position_set_timestamp
     1384webkit_geolocation_position_set_altitude
     1385webkit_geolocation_position_set_altitude_accuracy
     1386webkit_geolocation_position_set_heading
     1387webkit_geolocation_position_set_speed
     1388
     1389<SUBSECTION Private>
     1390WebKitGeolocationManagerPrivate
     1391webkit_geolocation_manager_get_type
     1392webkit_geolocation_position_get_type
     1393
     1394<SUBSECTION Standard>
     1395WebKitGeolocationManagerClass
     1396WEBKIT_TYPE_GEOLOCATION_MANAGER
     1397WEBKIT_GEOLOCATION_MANAGER
     1398WEBKIT_IS_GEOLOCATION_MANAGER
     1399WEBKIT_GEOLOCATION_MANAGER_CLASS
     1400WEBKIT_IS_GEOLOCATION_MANAGER_CLASS
     1401WEBKIT_GEOLOCATION_MANAGER_GET_CLASS
     1402WEBKIT_TYPE_GEOLOCATION_POSITION
     1403</SECTION>
     1404
     1405<SECTION>
    13711406<FILE>WebKitURIUtilities</FILE>
    13721407webkit_uri_for_display
  • trunk/Source/WebKit/UIProcess/API/wpe/docs/wpe-docs.sgml

    r242082 r243285  
    5757    <xi:include href="xml/WebKitApplicationInfo.xml"/>
    5858    <xi:include href="xml/WebKitColor.xml"/>
     59    <xi:include href="xml/WebKitGeolocationManager.xml"/>
    5960  </chapter>
    6061
     
    8384  </index>
    8485
     86  <index id="api-index-2-24" role="2.24">
     87    <title>Index of new symbols in 2.24</title>
     88    <xi:include href="xml/api-index-2.24.xml"><xi:fallback /></xi:include>
     89  </index>
     90
     91  <index id="api-index-2-26" role="2.26">
     92    <title>Index of new symbols in 2.26</title>
     93    <xi:include href="xml/api-index-2.62.xml"><xi:fallback /></xi:include>
     94  </index>
     95
    8596  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
    8697</book>
  • trunk/Source/WebKit/UIProcess/API/wpe/webkit.h

    r242312 r243285  
    4848#include <wpe/WebKitFindController.h>
    4949#include <wpe/WebKitFormSubmissionRequest.h>
     50#include <wpe/WebKitGeolocationManager.h>
    5051#include <wpe/WebKitGeolocationPermissionRequest.h>
    5152#include <wpe/WebKitHitTestResult.h>
  • trunk/Source/cmake/OptionsGTK.cmake

    r242709 r243285  
    8181WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ${GTK3_SUPPORTS_X11})
    8282WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ${GTK3_SUPPORTS_WAYLAND})
     83WEBKIT_OPTION_DEFINE(USE_GEOCLUE "Whether to enable default geolocation implementation using GeoClue2" PUBLIC ON)
    8384WEBKIT_OPTION_DEFINE(USE_LIBNOTIFY "Whether to enable the default web notification implementation." PUBLIC ON)
    8485WEBKIT_OPTION_DEFINE(USE_LIBHYPHEN "Whether to enable the default automatic hyphenation implementation." PUBLIC ON)
     
    141142WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ASYNC_SCROLLING PRIVATE ON)
    142143WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT PUBLIC ON)
    143 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PUBLIC ON)
    144144WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ICONDATABASE PUBLIC ON)
    145145WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_SPELLCHECK PUBLIC ON)
     
    223223endif ()
    224224
    225 if (ENABLE_GEOLOCATION)
     225if (USE_GEOCLUE)
    226226    find_package(GeoClue2 2.1.5)
    227227    if (NOT GEOCLUE2_FOUND)
    228         message(FATAL_ERROR "Geoclue is needed for ENABLE_GEOLOCATION.")
     228        message(FATAL_ERROR "Geoclue is needed for USE_GEOCLUE.")
    229229    endif ()
    230230endif ()
  • trunk/Source/cmake/OptionsWPE.cmake

    r243073 r243285  
    4949WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ASYNC_SCROLLING PRIVATE ON)
    5050WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_CONTENT_EXTENSIONS PRIVATE ON)
    51 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GEOLOCATION PRIVATE OFF)
    5251WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
    5352WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_NETSCAPE_PLUGIN_API PRIVATE OFF)
  • trunk/Tools/ChangeLog

    r243283 r243285  
     12019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK][WPE] Add API to provide geolocation information
     4        https://bugs.webkit.org/show_bug.cgi?id=195940
     5
     6        Reviewed by Michael Catanzaro.
     7
     8        Add a new test to check the new API.
     9
     10        * TestWebKitAPI/Tests/WebKitGLib/TestGeolocationManager.cpp: Added.
     11        (testGeolocationManagerCurrentPosition):
     12        (testGeolocationManagerWatchPosition):
     13        (beforeAll):
     14        (afterAll):
     15        * TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp:
     16        (testWebViewGeolocationPermissionRequests): Stop using ENABLE(GEOLOCATION) conditionals for geolocation tests.
     17        (beforeAll): Ditto.
     18        * TestWebKitAPI/glib/CMakeLists.txt:
     19
    1202019-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
    221
  • trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestUIClient.cpp

    r239772 r243285  
    787787#endif // PLATFORM(GTK)
    788788
    789 #if ENABLE(GEOLOCATION)
    790789static void testWebViewGeolocationPermissionRequests(UIClientTest* test, gconstpointer)
    791790{
     
    832831    test->addLogFatalFlag(G_LOG_LEVEL_WARNING);
    833832}
    834 #endif // ENABLE(GEOLOCATION)
    835833
    836834#if ENABLE(MEDIA_STREAM)
     
    11941192    UIClientTest::add("WebKitWebView", "mouse-target", testWebViewMouseTarget);
    11951193#endif
    1196 #if ENABLE(GEOLOCATION)
    11971194    UIClientTest::add("WebKitWebView", "geolocation-permission-requests", testWebViewGeolocationPermissionRequests);
    1198 #endif
    11991195#if ENABLE(MEDIA_STREAM)
    12001196    UIClientTest::add("WebKitWebView", "usermedia-enumeratedevices-permission-check", testWebViewUserMediaEnumerateDevicesPermissionCheck);
  • trunk/Tools/TestWebKitAPI/glib/CMakeLists.txt

    r241790 r243285  
    147147ADD_WK2_TEST(TestConsoleMessage ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp)
    148148ADD_WK2_TEST(TestDOMElement ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestDOMElement.cpp)
     149ADD_WK2_TEST(TestGeolocationManager ${TOOLS_DIR}/TestWebKitAPI/Tests/WebKitGLib/TestGeolocationManager.cpp)
    149150
    150151# FIXME: Enable for WPE
Note: See TracChangeset for help on using the changeset viewer.