Changeset 56781 in webkit


Ignore:
Timestamp:
Mar 30, 2010 6:27:34 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-30 Laszlo Gombos <Laszlo Gombos>

Reviewed by David Kilzer.

Guard Geolocation files with ENABLE_GEOLOCATION
https://bugs.webkit.org/show_bug.cgi?id=25756

The intent is to guard the Geolocation implementation files
and minimize the impact on on clients/call sites.

  • DerivedSources.make:
  • WebCore.Geolocation.exp: Added. Exported interfaces if GEOLOCATION is enabled.
  • WebCore.base.exp:
  • bindings/js/JSCustomPositionCallback.cpp:
  • bindings/js/JSCustomPositionErrorCallback.cpp:
  • bindings/js/JSGeolocationCustom.cpp:
  • page/Geolocation.cpp: (WebCore::Geolocation::disconnectFrame): Stub implementation if GEOLOCATION is turned off. (WebCore::Geolocation::Geolocation): Ditto. (WebCore::Geolocation::~Geolocation): Ditto. (WebCore::Geolocation::setIsAllowed): Ditto.
  • page/Geolocation.h:
  • page/Geolocation.idl:
  • page/GeolocationPositionCache.cpp:
  • page/Geoposition.idl:
  • page/PositionError.idl:
  • platform/GeolocationService.cpp:
  • platform/mock/GeolocationServiceMock.cpp:

2010-03-30 Laszlo Gombos <Laszlo Gombos>

Reviewed by David Kilzer.

Explicit guards for ENABLE_GEOLOCATION
https://bugs.webkit.org/show_bug.cgi?id=25756

  • WebCoreSupport/WebGeolocationMock.mm: (-[WebGeolocationMock setError:code:]): Make the body conditional on ENABLE(GEOLOCATION) (-[WebGeolocationMock setPosition:]): Ditto.
Location:
trunk
Files:
1 added
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r56780 r56781  
     12010-03-30  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by David Kilzer.
     4
     5        Guard Geolocation files with ENABLE_GEOLOCATION
     6        https://bugs.webkit.org/show_bug.cgi?id=25756
     7
     8        The intent is to guard the Geolocation implementation files
     9        and minimize the impact on on clients/call sites.
     10
     11        * DerivedSources.make:
     12        * WebCore.Geolocation.exp: Added. Exported interfaces if GEOLOCATION
     13        is enabled.
     14        * WebCore.base.exp:
     15        * bindings/js/JSCustomPositionCallback.cpp:
     16        * bindings/js/JSCustomPositionErrorCallback.cpp:
     17        * bindings/js/JSGeolocationCustom.cpp:
     18        * page/Geolocation.cpp:
     19        (WebCore::Geolocation::disconnectFrame): Stub implementation if
     20        GEOLOCATION is turned off.
     21        (WebCore::Geolocation::Geolocation): Ditto.
     22        (WebCore::Geolocation::~Geolocation): Ditto.
     23        (WebCore::Geolocation::setIsAllowed): Ditto.
     24        * page/Geolocation.h:
     25        * page/Geolocation.idl:
     26        * page/GeolocationPositionCache.cpp:
     27        * page/Geoposition.idl:
     28        * page/PositionError.idl:
     29        * platform/GeolocationService.cpp:
     30        * platform/mock/GeolocationServiceMock.cpp:
     31
    1322010-03-30  Andrey Kosyakov  <caseq@chromium.org>
    233
  • trunk/WebCore/DerivedSources.make

    r56445 r56781  
    873873endif
    874874
     875ifeq ($(findstring ENABLE_GEOLOCATION,$(FEATURE_DEFINES)), ENABLE_GEOLOCATION)
     876    WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Geolocation.exp
     877endif
     878
    875879WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES)
    876880        cat $^ > $@
  • trunk/WebCore/WebCore.base.exp

    r56718 r56781  
    447447__ZN7WebCore21mainThreadNormalWorldEv
    448448__ZN7WebCore21reportThreadViolationEPKcNS_20ThreadViolationRoundE
    449 __ZN7WebCore22GeolocationServiceMock11setPositionEN3WTF10PassRefPtrINS_11GeopositionEEE
    450 __ZN7WebCore22GeolocationServiceMock8setErrorEN3WTF10PassRefPtrINS_13PositionErrorEEE
    451449__ZN7WebCore22ScriptExecutionContext26canSuspendActiveDOMObjectsEv
    452450__ZN7WebCore22applicationIsAppleMailEv
  • trunk/WebCore/bindings/js/JSCustomPositionCallback.cpp

    r49280 r56781  
    2727#include "JSCustomPositionCallback.h"
    2828
     29#if ENABLE(GEOLOCATION)
     30
    2931#include "Frame.h"
    3032#include "JSGeoposition.h"
     
    5355
    5456} // namespace WebCore
     57
     58#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp

    r49280 r56781  
    2727#include "JSCustomPositionErrorCallback.h"
    2828
     29#if ENABLE(GEOLOCATION)
     30
    2931#include "Frame.h"
    3032#include "JSPositionError.h"
     
    5456   
    5557} // namespace WebCore
     58
     59#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/bindings/js/JSGeolocationCustom.cpp

    r48503 r56781  
    2626#include "config.h"
    2727#include "JSGeolocation.h"
     28
     29#if ENABLE(GEOLOCATION)
    2830
    2931#include "DOMWindow.h"
     
    179181
    180182} // namespace WebCore
     183
     184#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/page/Geolocation.cpp

    r56726 r56781  
    2929#include "Geolocation.h"
    3030
     31#if ENABLE(GEOLOCATION)
     32
    3133#include "Chrome.h"
    3234#include "Frame.h"
     
    640642
    641643} // namespace WebCore
     644
     645#else
     646
     647namespace WebCore {
     648
     649void Geolocation::disconnectFrame() {}
     650
     651Geolocation::Geolocation(Frame*) {}
     652
     653Geolocation::~Geolocation() {}
     654
     655void Geolocation::setIsAllowed(bool) {}
     656
     657}
     658                                                       
     659#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/page/Geolocation.h

    r56726 r56781  
    4747
    4848class Geolocation : public RefCounted<Geolocation>
    49 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
     49#if !ENABLE(CLIENT_BASED_GEOLOCATION) && ENABLE(GEOLOCATION)
    5050    , public GeolocationServiceClient
    5151#endif
     
    138138    void stopUpdating();
    139139
    140 #if !ENABLE(CLIENT_BASED_GEOLOCATION)
     140#if !ENABLE(CLIENT_BASED_GEOLOCATION) && ENABLE(GEOLOCATION)
    141141    // GeolocationServiceClient
    142142    virtual void geolocationServicePositionChanged(GeolocationService*);
     
    172172    bool m_shouldClearCache;
    173173
     174#if ENABLE(GEOLOCATION)
    174175    OwnPtr<GeolocationPositionCache> m_positionCache;
     176#endif
    175177    GeoNotifierSet m_requestsAwaitingCachedPosition;
    176178};
  • trunk/WebCore/page/Geolocation.idl

    r56188 r56781  
    2626module core {
    2727
    28     interface [OmitConstructor] Geolocation {
     28    interface [Conditional=GEOLOCATION, OmitConstructor] Geolocation {
    2929        [Custom] void getCurrentPosition(in PositionCallback successCallback, in PositionErrorCallback errorCallback, in PositionOptions options);
    3030
  • trunk/WebCore/page/GeolocationPositionCache.cpp

    r55939 r56781  
    2626#include "config.h"
    2727#include "GeolocationPositionCache.h"
     28
     29#if ENABLE(GEOLOCATION)
    2830
    2931#include "Geoposition.h"
     
    173175
    174176} // namespace WebCore
     177
     178#endif // ENABLE(GEOLOCATION)
  • trunk/WebCore/page/Geoposition.idl

    r52534 r56781  
    2626module core {
    2727
    28     interface [OmitConstructor] Geoposition {
     28    interface [Conditional=GEOLOCATION, OmitConstructor] Geoposition {
    2929        readonly attribute Coordinates coords;
    3030        readonly attribute DOMTimeStamp timestamp;
  • trunk/WebCore/page/PositionError.idl

    r52537 r56781  
    2626module core {
    2727
    28     interface PositionError {
     28    interface [Conditional=GEOLOCATION] PositionError {
    2929        readonly attribute unsigned short code;
    3030        readonly attribute DOMString message;
  • trunk/WebCore/platform/GeolocationService.cpp

    r54883 r56781  
    5050}
    5151
     52#if ENABLE(GEOLOCATION)
    5253void GeolocationService::useMock()
    5354{
     
    7172}
    7273
     74#endif
     75
    7376} // namespace WebCore
  • trunk/WebCore/platform/mock/GeolocationServiceMock.cpp

    r48144 r56781  
    2626#include "config.h"
    2727#include "GeolocationServiceMock.h"
     28
     29#if ENABLE(GEOLOCATION)
    2830
    2931#include "Logging.h"
     
    135137
    136138} // namespace WebCore
     139
     140#endif
  • trunk/WebKit/mac/ChangeLog

    r56718 r56781  
     12010-03-30  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
     2
     3        Reviewed by David Kilzer.
     4
     5        Explicit guards for ENABLE_GEOLOCATION
     6        https://bugs.webkit.org/show_bug.cgi?id=25756
     7
     8        * WebCoreSupport/WebGeolocationMock.mm:
     9        (-[WebGeolocationMock setError:code:]): Make the body conditional on
     10        ENABLE(GEOLOCATION)
     11        (-[WebGeolocationMock setPosition:]): Ditto.
     12
    1132010-03-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
    214
  • trunk/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm

    r51147 r56781  
    3939+ (void)setPosition:(double)latitude:(double)longitude:(double)accuracy
    4040{
     41#if ENABLE(GEOLOCATION)
    4142    RefPtr<Coordinates> coordinates = Coordinates::create(latitude,
    4243                                                          longitude,
     
    4849    RefPtr<Geoposition> position = Geoposition::create(coordinates.release(), currentTime() * 1000.0);
    4950    GeolocationServiceMock::setPosition(position.release());
     51#endif
    5052}
    5153
    5254+ (void)setError:(int)code:(NSString *)message
    5355{
     56#if ENABLE(GEOLOCATION)
    5457    PositionError::ErrorCode codeEnum = static_cast<PositionError::ErrorCode>(code);
    5558    RefPtr<PositionError> error = PositionError::create(codeEnum, message);
    5659    GeolocationServiceMock::setError(error.release());
     60#endif
    5761}
    5862
Note: See TracChangeset for help on using the changeset viewer.