Changeset 56781 in webkit
- Timestamp:
- Mar 30, 2010 6:27:34 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r56780 r56781 1 2010-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 1 32 2010-03-30 Andrey Kosyakov <caseq@chromium.org> 2 33 -
trunk/WebCore/DerivedSources.make
r56445 r56781 873 873 endif 874 874 875 ifeq ($(findstring ENABLE_GEOLOCATION,$(FEATURE_DEFINES)), ENABLE_GEOLOCATION) 876 WEBCORE_EXPORT_DEPENDENCIES := $(WEBCORE_EXPORT_DEPENDENCIES) WebCore.Geolocation.exp 877 endif 878 875 879 WebCore.exp : WebCore.base.exp $(WEBCORE_EXPORT_DEPENDENCIES) 876 880 cat $^ > $@ -
trunk/WebCore/WebCore.base.exp
r56718 r56781 447 447 __ZN7WebCore21mainThreadNormalWorldEv 448 448 __ZN7WebCore21reportThreadViolationEPKcNS_20ThreadViolationRoundE 449 __ZN7WebCore22GeolocationServiceMock11setPositionEN3WTF10PassRefPtrINS_11GeopositionEEE450 __ZN7WebCore22GeolocationServiceMock8setErrorEN3WTF10PassRefPtrINS_13PositionErrorEEE451 449 __ZN7WebCore22ScriptExecutionContext26canSuspendActiveDOMObjectsEv 452 450 __ZN7WebCore22applicationIsAppleMailEv -
trunk/WebCore/bindings/js/JSCustomPositionCallback.cpp
r49280 r56781 27 27 #include "JSCustomPositionCallback.h" 28 28 29 #if ENABLE(GEOLOCATION) 30 29 31 #include "Frame.h" 30 32 #include "JSGeoposition.h" … … 53 55 54 56 } // namespace WebCore 57 58 #endif // ENABLE(GEOLOCATION) -
trunk/WebCore/bindings/js/JSCustomPositionErrorCallback.cpp
r49280 r56781 27 27 #include "JSCustomPositionErrorCallback.h" 28 28 29 #if ENABLE(GEOLOCATION) 30 29 31 #include "Frame.h" 30 32 #include "JSPositionError.h" … … 54 56 55 57 } // namespace WebCore 58 59 #endif // ENABLE(GEOLOCATION) -
trunk/WebCore/bindings/js/JSGeolocationCustom.cpp
r48503 r56781 26 26 #include "config.h" 27 27 #include "JSGeolocation.h" 28 29 #if ENABLE(GEOLOCATION) 28 30 29 31 #include "DOMWindow.h" … … 179 181 180 182 } // namespace WebCore 183 184 #endif // ENABLE(GEOLOCATION) -
trunk/WebCore/page/Geolocation.cpp
r56726 r56781 29 29 #include "Geolocation.h" 30 30 31 #if ENABLE(GEOLOCATION) 32 31 33 #include "Chrome.h" 32 34 #include "Frame.h" … … 640 642 641 643 } // namespace WebCore 644 645 #else 646 647 namespace WebCore { 648 649 void Geolocation::disconnectFrame() {} 650 651 Geolocation::Geolocation(Frame*) {} 652 653 Geolocation::~Geolocation() {} 654 655 void Geolocation::setIsAllowed(bool) {} 656 657 } 658 659 #endif // ENABLE(GEOLOCATION) -
trunk/WebCore/page/Geolocation.h
r56726 r56781 47 47 48 48 class Geolocation : public RefCounted<Geolocation> 49 #if !ENABLE(CLIENT_BASED_GEOLOCATION) 49 #if !ENABLE(CLIENT_BASED_GEOLOCATION) && ENABLE(GEOLOCATION) 50 50 , public GeolocationServiceClient 51 51 #endif … … 138 138 void stopUpdating(); 139 139 140 #if !ENABLE(CLIENT_BASED_GEOLOCATION) 140 #if !ENABLE(CLIENT_BASED_GEOLOCATION) && ENABLE(GEOLOCATION) 141 141 // GeolocationServiceClient 142 142 virtual void geolocationServicePositionChanged(GeolocationService*); … … 172 172 bool m_shouldClearCache; 173 173 174 #if ENABLE(GEOLOCATION) 174 175 OwnPtr<GeolocationPositionCache> m_positionCache; 176 #endif 175 177 GeoNotifierSet m_requestsAwaitingCachedPosition; 176 178 }; -
trunk/WebCore/page/Geolocation.idl
r56188 r56781 26 26 module core { 27 27 28 interface [ OmitConstructor] Geolocation {28 interface [Conditional=GEOLOCATION, OmitConstructor] Geolocation { 29 29 [Custom] void getCurrentPosition(in PositionCallback successCallback, in PositionErrorCallback errorCallback, in PositionOptions options); 30 30 -
trunk/WebCore/page/GeolocationPositionCache.cpp
r55939 r56781 26 26 #include "config.h" 27 27 #include "GeolocationPositionCache.h" 28 29 #if ENABLE(GEOLOCATION) 28 30 29 31 #include "Geoposition.h" … … 173 175 174 176 } // namespace WebCore 177 178 #endif // ENABLE(GEOLOCATION) -
trunk/WebCore/page/Geoposition.idl
r52534 r56781 26 26 module core { 27 27 28 interface [ OmitConstructor] Geoposition {28 interface [Conditional=GEOLOCATION, OmitConstructor] Geoposition { 29 29 readonly attribute Coordinates coords; 30 30 readonly attribute DOMTimeStamp timestamp; -
trunk/WebCore/page/PositionError.idl
r52537 r56781 26 26 module core { 27 27 28 interface PositionError {28 interface [Conditional=GEOLOCATION] PositionError { 29 29 readonly attribute unsigned short code; 30 30 readonly attribute DOMString message; -
trunk/WebCore/platform/GeolocationService.cpp
r54883 r56781 50 50 } 51 51 52 #if ENABLE(GEOLOCATION) 52 53 void GeolocationService::useMock() 53 54 { … … 71 72 } 72 73 74 #endif 75 73 76 } // namespace WebCore -
trunk/WebCore/platform/mock/GeolocationServiceMock.cpp
r48144 r56781 26 26 #include "config.h" 27 27 #include "GeolocationServiceMock.h" 28 29 #if ENABLE(GEOLOCATION) 28 30 29 31 #include "Logging.h" … … 135 137 136 138 } // namespace WebCore 139 140 #endif -
trunk/WebKit/mac/ChangeLog
r56718 r56781 1 2010-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 1 13 2010-03-26 Kenneth Rohde Christiansen <kenneth@webkit.org> 2 14 -
trunk/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm
r51147 r56781 39 39 + (void)setPosition:(double)latitude:(double)longitude:(double)accuracy 40 40 { 41 #if ENABLE(GEOLOCATION) 41 42 RefPtr<Coordinates> coordinates = Coordinates::create(latitude, 42 43 longitude, … … 48 49 RefPtr<Geoposition> position = Geoposition::create(coordinates.release(), currentTime() * 1000.0); 49 50 GeolocationServiceMock::setPosition(position.release()); 51 #endif 50 52 } 51 53 52 54 + (void)setError:(int)code:(NSString *)message 53 55 { 56 #if ENABLE(GEOLOCATION) 54 57 PositionError::ErrorCode codeEnum = static_cast<PositionError::ErrorCode>(code); 55 58 RefPtr<PositionError> error = PositionError::create(codeEnum, message); 56 59 GeolocationServiceMock::setError(error.release()); 60 #endif 57 61 } 58 62
Note: See TracChangeset
for help on using the changeset viewer.