[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

weinig at apple.com weinig at apple.com
Thu Apr 8 00:35:31 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit d14ccddbed47cf9f40e30db9d1caa8f41518bc5a
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 14 19:26:50 2009 +0000

    Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
    Add client based Geolocation provider
    
    Reviewed by Dan Bernstein.
    
    Add first cut of a client based Geolocation provider. This is guarded by
    ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
    GeolocationControllerClient interface that no-one currently implements,
    but will in a subsequent patch.
    
    WebCore:
    
    * GNUmakefile.am:
    * WebCore.base.exp:
    * WebCore.gypi:
    * WebCore.pro:
    * WebCore.vcproj/WebCore.vcproj:
    * WebCore.xcodeproj/project.pbxproj:
    * WebCoreSources.bkl:
    * page/Geolocation.cpp:
    (WebCore::createGeopositionFromGeolocationPosition):
    (WebCore::createPositionErrorFromGeolocationError):
    (WebCore::Geolocation::Geolocation):
    (WebCore::Geolocation::~Geolocation):
    (WebCore::Geolocation::disconnectFrame):
    (WebCore::Geolocation::lastPosition):
    (WebCore::Geolocation::startRequest):
    (WebCore::Geolocation::fatalErrorOccurred):
    (WebCore::Geolocation::requestTimedOut):
    (WebCore::Geolocation::clearWatch):
    (WebCore::Geolocation::handleError):
    (WebCore::Geolocation::positionChanged):
    (WebCore::Geolocation::makeSuccessCallbacks):
    (WebCore::Geolocation::errorOccurred):
    (WebCore::Geolocation::geolocationServicePositionChanged):
    (WebCore::Geolocation::geolocationServiceErrorOccurred):
    (WebCore::Geolocation::startUpdating):
    (WebCore::Geolocation::stopUpdating):
    * page/Geolocation.h:
    * page/GeolocationController.cpp: Added.
    (WebCore::GeolocationController::GeolocationController):
    (WebCore::GeolocationController::~GeolocationController):
    (WebCore::GeolocationController::addObserver):
    (WebCore::GeolocationController::removeObserver):
    (WebCore::GeolocationController::positionChanged):
    (WebCore::GeolocationController::errorOccurred):
    (WebCore::GeolocationController::lastPosition):
    * page/GeolocationController.h: Added.
    * page/GeolocationControllerClient.h: Added.
    (WebCore::GeolocationControllerClient::~GeolocationControllerClient):
    * page/GeolocationError.h: Added.
    (WebCore::GeolocationError::):
    (WebCore::GeolocationError::create):
    (WebCore::GeolocationError::code):
    (WebCore::GeolocationError::message):
    * page/GeolocationPosition.h: Added.
    (WebCore::GeolocationPosition::create):
    (WebCore::GeolocationPosition::timestamp):
    (WebCore::GeolocationPosition::latitude):
    (WebCore::GeolocationPosition::longitude):
    (WebCore::GeolocationPosition::accuracy):
    (WebCore::GeolocationPosition::altitude):
    (WebCore::GeolocationPosition::altitudeAccuracy):
    (WebCore::GeolocationPosition::heading):
    (WebCore::GeolocationPosition::speed):
    (WebCore::GeolocationPosition::canProvideAltitude):
    (WebCore::GeolocationPosition::canProvideAltitudeAccuracy):
    (WebCore::GeolocationPosition::canProvideHeading):
    (WebCore::GeolocationPosition::canProvideSpeed):
    (WebCore::GeolocationPosition::GeolocationPosition):
    * page/Geoposition.h:
    (WebCore::Geoposition::create):
    * page/Page.cpp:
    (WebCore::Page::Page):
    * page/Page.h:
    (WebCore::Page::geolocationController):
    * svg/graphics/SVGImage.cpp:
    (WebCore::SVGImage::dataChanged):
    
    WebKit/chromium:
    
    * src/WebViewImpl.cpp:
    (WebKit::WebViewImpl::WebViewImpl):
    
    WebKit/gtk:
    
    * webkit/webkitwebview.cpp:
    (webkit_web_view_init):
    
    WebKit/mac:
    
    * WebView/WebView.mm:
    (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
    
    WebKit/qt:
    
    * Api/qwebpage.cpp:
    (QWebPagePrivate::QWebPagePrivate):
    
    WebKit/win:
    
    * WebView.cpp:
    (WebView::initWithFrame):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52103 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c87b051..8170b4f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,82 @@
+2009-12-13  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Dan Bernstein.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
+        Add client based Geolocation provider
+
+        Add first cut of a client based Geolocation provider. This is guarded by
+        ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
+        GeolocationControllerClient interface that no-one currently implements,
+        but will in a subsequent patch.
+
+        * GNUmakefile.am:
+        * WebCore.base.exp:
+        * WebCore.gypi:
+        * WebCore.pro:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * WebCoreSources.bkl:
+        * page/Geolocation.cpp:
+        (WebCore::createGeopositionFromGeolocationPosition):
+        (WebCore::createPositionErrorFromGeolocationError):
+        (WebCore::Geolocation::Geolocation):
+        (WebCore::Geolocation::~Geolocation):
+        (WebCore::Geolocation::disconnectFrame):
+        (WebCore::Geolocation::lastPosition):
+        (WebCore::Geolocation::startRequest):
+        (WebCore::Geolocation::fatalErrorOccurred):
+        (WebCore::Geolocation::requestTimedOut):
+        (WebCore::Geolocation::clearWatch):
+        (WebCore::Geolocation::handleError):
+        (WebCore::Geolocation::positionChanged):
+        (WebCore::Geolocation::makeSuccessCallbacks):
+        (WebCore::Geolocation::errorOccurred):
+        (WebCore::Geolocation::geolocationServicePositionChanged):
+        (WebCore::Geolocation::geolocationServiceErrorOccurred):
+        (WebCore::Geolocation::startUpdating):
+        (WebCore::Geolocation::stopUpdating):
+        * page/Geolocation.h:
+        * page/GeolocationController.cpp: Added.
+        (WebCore::GeolocationController::GeolocationController):
+        (WebCore::GeolocationController::~GeolocationController):
+        (WebCore::GeolocationController::addObserver):
+        (WebCore::GeolocationController::removeObserver):
+        (WebCore::GeolocationController::positionChanged):
+        (WebCore::GeolocationController::errorOccurred):
+        (WebCore::GeolocationController::lastPosition):
+        * page/GeolocationController.h: Added.
+        * page/GeolocationControllerClient.h: Added.
+        (WebCore::GeolocationControllerClient::~GeolocationControllerClient):
+        * page/GeolocationError.h: Added.
+        (WebCore::GeolocationError::):
+        (WebCore::GeolocationError::create):
+        (WebCore::GeolocationError::code):
+        (WebCore::GeolocationError::message):
+        * page/GeolocationPosition.h: Added.
+        (WebCore::GeolocationPosition::create):
+        (WebCore::GeolocationPosition::timestamp):
+        (WebCore::GeolocationPosition::latitude):
+        (WebCore::GeolocationPosition::longitude):
+        (WebCore::GeolocationPosition::accuracy):
+        (WebCore::GeolocationPosition::altitude):
+        (WebCore::GeolocationPosition::altitudeAccuracy):
+        (WebCore::GeolocationPosition::heading):
+        (WebCore::GeolocationPosition::speed):
+        (WebCore::GeolocationPosition::canProvideAltitude):
+        (WebCore::GeolocationPosition::canProvideAltitudeAccuracy):
+        (WebCore::GeolocationPosition::canProvideHeading):
+        (WebCore::GeolocationPosition::canProvideSpeed):
+        (WebCore::GeolocationPosition::GeolocationPosition):
+        * page/Geoposition.h:
+        (WebCore::Geoposition::create):
+        * page/Page.cpp:
+        (WebCore::Page::Page):
+        * page/Page.h:
+        (WebCore::Page::geolocationController):
+        * svg/graphics/SVGImage.cpp:
+        (WebCore::SVGImage::dataChanged):
+
 2009-12-14  Adam Langley  <agl at google.com>
 
         Reviewed by Darin Adler.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index b8e6af7..97f3721 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1347,6 +1347,11 @@ webcore_sources += \
 	WebCore/page/FrameView.h \
 	WebCore/page/Geolocation.cpp \
 	WebCore/page/Geolocation.h \
+	WebCore/page/GeolocationController.cpp \
+	WebCore/page/GeolocationController.h \
+	WebCore/page/GeolocationControllerClient.h \
+	WebCore/page/GeolocationError.h \
+	WebCore/page/GeolocationPosition.h \
 	WebCore/page/Geoposition.h \
 	WebCore/page/HaltablePlugin.h \
 	WebCore/page/History.cpp \
diff --git a/WebCore/WebCore.base.exp b/WebCore/WebCore.base.exp
index 8df5524..c29629a 100644
--- a/WebCore/WebCore.base.exp
+++ b/WebCore/WebCore.base.exp
@@ -292,6 +292,7 @@ __ZN7WebCore14ResourceHandle12releaseProxyEv
 __ZN7WebCore14ResourceHandle20forceContentSniffingEv
 __ZN7WebCore14ResourceLoader14cancelledErrorEv
 __ZN7WebCore14ResourceLoader19setShouldBufferDataEb
+__ZN7WebCore14SVGSMILElement13isSMILElementEPNS_4NodeE
 __ZN7WebCore14SecurityOrigin16createFromStringERKNS_6StringE
 __ZN7WebCore14SecurityOrigin18setLocalLoadPolicyENS0_15LocalLoadPolicyE
 __ZN7WebCore14SecurityOrigin18shouldHideReferrerERKNS_4KURLERKNS_6StringE
@@ -414,6 +415,7 @@ __ZN7WebCore21JavaScriptDebugServer23recompileAllJSFunctionsEPNS_5TimerIS0_EE
 __ZN7WebCore21JavaScriptDebugServer6sharedEv
 __ZN7WebCore21PlatformKeyboardEvent24disambiguateKeyDownEventENS0_4TypeEb
 __ZN7WebCore21PlatformKeyboardEventC1EP7NSEvent
+__ZN7WebCore21SVGDocumentExtensions21sampleAnimationAtTimeERKNS_6StringEPNS_14SVGSMILElementEd
 __ZN7WebCore21SerializedScriptValue11deserializeEPK15OpaqueJSContextPPK13OpaqueJSValue
 __ZN7WebCore21SerializedScriptValue6createEPK15OpaqueJSContextPK13OpaqueJSValuePS6_
 __ZN7WebCore21SerializedScriptValueD1Ev
@@ -495,7 +497,7 @@ __ZN7WebCore4Page6goBackEv
 __ZN7WebCore4Page8goToItemEPNS_11HistoryItemENS_13FrameLoadTypeE
 __ZN7WebCore4Page9goForwardEv
 __ZN7WebCore4Page9initGroupEv
-__ZN7WebCore4PageC1EPNS_12ChromeClientEPNS_17ContextMenuClientEPNS_12EditorClientEPNS_10DragClientEPNS_15InspectorClientEPNS_18PluginHalterClientE
+__ZN7WebCore4PageC1EPNS_12ChromeClientEPNS_17ContextMenuClientEPNS_12EditorClientEPNS_10DragClientEPNS_15InspectorClientEPNS_18PluginHalterClientEPNS_27GeolocationControllerClientE
 __ZN7WebCore4PageD1Ev
 __ZN7WebCore4coreEP20NSURLProtectionSpace
 __ZN7WebCore5Cache11setDisabledEb
@@ -601,8 +603,10 @@ __ZN7WebCore7cookiesEPKNS_8DocumentERKNS_4KURLE
 __ZN7WebCore7nsColorERKNS_5ColorE
 __ZN7WebCore8Document11createRangeEv
 __ZN7WebCore8Document13removeMarkersENS_14DocumentMarker10MarkerTypeE
+__ZN7WebCore8Document13svgExtensionsEv
 __ZN7WebCore8Document14setFocusedNodeEN3WTF10PassRefPtrINS_4NodeEEE
 __ZN7WebCore8Document17getFocusableNodesERN3WTF6VectorINS1_6RefPtrINS_4NodeEEELm0EEE
+__ZN7WebCore8Document19accessSVGExtensionsEv
 __ZN7WebCore8Document22createDocumentFragmentEv
 __ZN7WebCore8Document23renderedRectsForMarkersENS_14DocumentMarker10MarkerTypeE
 __ZN7WebCore8Document24setShouldCreateRenderersEb
@@ -627,9 +631,9 @@ __ZN7WebCore8Settings20setCursiveFontFamilyERKNS_12AtomicStringE
 __ZN7WebCore8Settings20setFantasyFontFamilyERKNS_12AtomicStringE
 __ZN7WebCore8Settings20setJavaScriptEnabledEb
 __ZN7WebCore8Settings20setXSSAuditorEnabledEb
+__ZN7WebCore8Settings21setShowRepaintCounterEb
 __ZN7WebCore8Settings21setStandardFontFamilyERKNS_12AtomicStringE
 __ZN7WebCore8Settings21setWebSecurityEnabledEb
-__ZN7WebCore8Settings21setShowRepaintCounterEb
 __ZN7WebCore8Settings22setLocalStorageEnabledEb
 __ZN7WebCore8Settings22setSansSerifFontFamilyERKNS_12AtomicStringE
 __ZN7WebCore8Settings22setShowsURLsInToolTipsEb
@@ -961,9 +965,9 @@ __ZNK7WebCore8Document31displayStringModifiedByEncodingERKNS_6StringE
 __ZNK7WebCore8Document4bodyEv
 __ZNK7WebCore8Document6domainEv
 __ZNK7WebCore8IntPointcv8_NSPointEv
+__ZNK7WebCore8Position10downstreamENS0_27EditingBoundaryCrossingRuleE
 __ZNK7WebCore8Position25leadingWhitespacePositionENS_9EAffinityEb
 __ZNK7WebCore8Position26trailingWhitespacePositionENS_9EAffinityEb
-__ZNK7WebCore8Position10downstreamENS0_27EditingBoundaryCrossingRuleE
 __ZNK7WebCore8Position8upstreamENS0_27EditingBoundaryCrossingRuleE
 __ZNK7WebCore9DOMWindow27pendingUnloadEventListenersEv
 __ZNK7WebCore9FloatRectcv7_NSRectEv
@@ -982,10 +986,6 @@ __ZTVN7WebCore12ChromeClientE
 __ZTVN7WebCore17FileChooserClientE
 __ZTVN7WebCore17FrameLoaderClientE
 __ZTVN7WebCore25HistoryPropertyListWriterE
-__ZN7WebCore14SVGSMILElement13isSMILElementEPNS_4NodeE
-__ZN7WebCore21SVGDocumentExtensions21sampleAnimationAtTimeERKNS_6StringEPNS_14SVGSMILElementEd
-__ZN7WebCore8Document19accessSVGExtensionsEv
-__ZN7WebCore8Document13svgExtensionsEv
 _filenameByFixingIllegalCharacters
 _hasCaseInsensitiveSubstring
 _hasCaseInsensitiveSuffix
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index abd0de0..2680e65 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1791,6 +1791,11 @@
             'page/FrameView.h',
             'page/Geolocation.cpp',
             'page/Geolocation.h',
+            'page/GeolocationController.cpp'
+            'page/GeolocationController.h'
+            'page/GeolocationControllerClient.h'
+            'page/GeolocationError.h'
+            'page/GeolocationPosition.h'
             'page/Geoposition.h',
             'page/HaltablePlugin.h',
             'page/History.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index 4419199..1798c84 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1169,6 +1169,7 @@ SOURCES += \
     page/FrameTree.cpp \
     page/FrameView.cpp \
     page/Geolocation.cpp \
+    page/GeolocationController.cpp \
     page/History.cpp \
     page/Location.cpp \
     page/MouseEventWithHitTestResults.cpp \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index ef2700a..71d8052 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -20645,6 +20645,26 @@
 				>
 			</File>
 			<File
+				RelativePath="..\page\GeolocationController.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\page\GeolocationController.h"
+				>
+			</File>
+			<File
+				RelativePath="..\page\GeolocationControllerClient.h"
+				>
+			</File>
+			<File
+				RelativePath="..\page\GeolocationError.h"
+				>
+			</File>
+			<File
+				RelativePath="..\page\GeolocationPosition.h"
+				>
+			</File>
+			<File
 				RelativePath="..\page\Geoposition.h"
 				>
 			</File>
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 750e3ac..5aa1905 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -4189,6 +4189,11 @@
 		BC53C6080DA56C570021EB5D /* Gradient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC53C6070DA56C570021EB5D /* Gradient.cpp */; };
 		BC53C60B0DA56CF10021EB5D /* GradientCG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC53C60A0DA56CF10021EB5D /* GradientCG.cpp */; };
 		BC53C6920DA591140021EB5D /* CSSGradientValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC53C6910DA591140021EB5D /* CSSGradientValue.h */; };
+		BC56CB2110D5AC8000A77C64 /* GeolocationController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC56CB1C10D5AC8000A77C64 /* GeolocationController.cpp */; };
+		BC56CB2210D5AC8000A77C64 /* GeolocationController.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB1D10D5AC8000A77C64 /* GeolocationController.h */; };
+		BC56CB2310D5AC8000A77C64 /* GeolocationControllerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB1E10D5AC8000A77C64 /* GeolocationControllerClient.h */; };
+		BC56CB2410D5AC8000A77C64 /* GeolocationError.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB1F10D5AC8000A77C64 /* GeolocationError.h */; };
+		BC56CB2510D5AC8000A77C64 /* GeolocationPosition.h in Headers */ = {isa = PBXBuildFile; fileRef = BC56CB2010D5AC8000A77C64 /* GeolocationPosition.h */; };
 		BC5823F50C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5823F40C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp */; };
 		BC5825F30C0B89380053F1B5 /* JSCSSStyleDeclarationCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5825F20C0B89380053F1B5 /* JSCSSStyleDeclarationCustom.cpp */; };
 		BC588AF00BFA6CF900EE679E /* HTMLParserErrorCodes.h in Headers */ = {isa = PBXBuildFile; fileRef = BC588AEF0BFA6CF900EE679E /* HTMLParserErrorCodes.h */; };
@@ -9356,6 +9361,11 @@
 		BC53C6070DA56C570021EB5D /* Gradient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Gradient.cpp; sourceTree = "<group>"; };
 		BC53C60A0DA56CF10021EB5D /* GradientCG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GradientCG.cpp; sourceTree = "<group>"; };
 		BC53C6910DA591140021EB5D /* CSSGradientValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSGradientValue.h; sourceTree = "<group>"; };
+		BC56CB1C10D5AC8000A77C64 /* GeolocationController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeolocationController.cpp; sourceTree = "<group>"; };
+		BC56CB1D10D5AC8000A77C64 /* GeolocationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationController.h; sourceTree = "<group>"; };
+		BC56CB1E10D5AC8000A77C64 /* GeolocationControllerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationControllerClient.h; sourceTree = "<group>"; };
+		BC56CB1F10D5AC8000A77C64 /* GeolocationError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationError.h; sourceTree = "<group>"; };
+		BC56CB2010D5AC8000A77C64 /* GeolocationPosition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeolocationPosition.h; sourceTree = "<group>"; };
 		BC5823F40C0A98DF0053F1B5 /* JSHTMLElementCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLElementCustom.cpp; sourceTree = "<group>"; };
 		BC5825F20C0B89380053F1B5 /* JSCSSStyleDeclarationCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSStyleDeclarationCustom.cpp; sourceTree = "<group>"; };
 		BC588AEF0BFA6CF900EE679E /* HTMLParserErrorCodes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTMLParserErrorCodes.h; sourceTree = "<group>"; };
@@ -11275,6 +11285,11 @@
 				FE80D7B70E9C1F25000D6F75 /* Geolocation.cpp */,
 				FE80D7B80E9C1F25000D6F75 /* Geolocation.h */,
 				FE80D7B90E9C1F25000D6F75 /* Geolocation.idl */,
+				BC56CB1C10D5AC8000A77C64 /* GeolocationController.cpp */,
+				BC56CB1D10D5AC8000A77C64 /* GeolocationController.h */,
+				BC56CB1E10D5AC8000A77C64 /* GeolocationControllerClient.h */,
+				BC56CB1F10D5AC8000A77C64 /* GeolocationError.h */,
+				BC56CB2010D5AC8000A77C64 /* GeolocationPosition.h */,
 				FE80D7BB0E9C1F25000D6F75 /* Geoposition.h */,
 				FE80D7BC0E9C1F25000D6F75 /* Geoposition.idl */,
 				7693BACE106C2DCA007B0823 /* HaltablePlugin.h */,
@@ -18246,6 +18261,10 @@
 				7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */,
 				0C3F1F5B10C8871200D72CE1 /* WebGLUniformLocation.h in Headers */,
 				0C45342810CDBBFA00869157 /* JSWebGLUniformLocation.h in Headers */,
+				BC56CB2210D5AC8000A77C64 /* GeolocationController.h in Headers */,
+				BC56CB2310D5AC8000A77C64 /* GeolocationControllerClient.h in Headers */,
+				BC56CB2410D5AC8000A77C64 /* GeolocationError.h in Headers */,
+				BC56CB2510D5AC8000A77C64 /* GeolocationPosition.h in Headers */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -20403,6 +20422,7 @@
 				599D1E3210C97D6E00E0EF12 /* jni_utility_private.cpp in Sources */,
 				0C3F1F5A10C8871200D72CE1 /* WebGLUniformLocation.cpp in Sources */,
 				0C45342710CDBBFA00869157 /* JSWebGLUniformLocation.cpp in Sources */,
+				BC56CB2110D5AC8000A77C64 /* GeolocationController.cpp in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
diff --git a/WebCore/WebCoreSources.bkl b/WebCore/WebCoreSources.bkl
index cd94ae6..d44e593 100644
--- a/WebCore/WebCoreSources.bkl
+++ b/WebCore/WebCoreSources.bkl
@@ -777,6 +777,7 @@ This file contains the list of files needed to build WebCore.
         page/FrameTree.cpp
         page/FrameView.cpp
         page/Geolocation.cpp
+        page/GeolocationController.cpp
         page/History.cpp
         page/Location.cpp
         page/MouseEventWithHitTestResults.cpp
diff --git a/WebCore/page/Geolocation.cpp b/WebCore/page/Geolocation.cpp
index c4fac86..ce204fd 100644
--- a/WebCore/page/Geolocation.cpp
+++ b/WebCore/page/Geolocation.cpp
@@ -32,10 +32,45 @@
 #include "Frame.h"
 #include "Page.h"
 
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#include "Coordinates.h"
+#include "GeolocationController.h"
+#include "GeolocationError.h"
+#include "GeolocationPosition.h"
+#include "Geoposition.h"
+#include "PositionError.h"
+#endif
+
 namespace WebCore {
 
 static const char permissionDeniedErrorMessage[] = "User denied Geolocation";
 
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+
+static PassRefPtr<Geoposition> createGeoposition(GeolocationPosition* position)
+{
+    RefPtr<Coordinates> coordinates = Coordinates::create(position->latitude(), position->longitude(), position->canProvideAltitude(), position->altitude(), 
+                                                          position->accuracy(), position->canProvideAltitudeAccuracy(), position->altitudeAccuracy(),
+                                                          position->canProvideHeading(), position->heading(), position->canProvideSpeed(), position->speed());
+    return Geoposition::create(coordinates.release(), position->timestamp());
+}
+
+static PassRefPtr<PositionError> createPositionError(GeolocationError* error)
+{
+    PositionError::ErrorCode code = PositionError::POSITION_UNAVAILABLE;
+    switch (error->code()) {
+    case GeolocationError::PermissionDenied:
+        code = PositionError::PERMISSION_DENIED;
+        break;
+    case GeolocationError::PositionUnavailable:
+        code = PositionError::POSITION_UNAVAILABLE;
+        break;
+    }
+
+    return PositionError::create(code, error->message());
+}
+#endif
+
 Geolocation::GeoNotifier::GeoNotifier(Geolocation* geolocation, PassRefPtr<PositionCallback> successCallback, PassRefPtr<PositionErrorCallback> errorCallback, PassRefPtr<PositionOptions> options)
     : m_geolocation(geolocation)
     , m_successCallback(successCallback)
@@ -136,7 +171,9 @@ void Geolocation::Watchers::getNotifiersVector(Vector<RefPtr<GeoNotifier> >& cop
 
 Geolocation::Geolocation(Frame* frame)
     : m_frame(frame)
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
     , m_service(GeolocationService::create(this))
+#endif
     , m_allowGeolocation(Unknown)
     , m_shouldClearCache(false)
 {
@@ -146,14 +183,36 @@ Geolocation::Geolocation(Frame* frame)
     m_frame->document()->setUsingGeolocation(true);
 }
 
+Geolocation::~Geolocation()
+{
+}
+
 void Geolocation::disconnectFrame()
 {
-    m_service->stopUpdating();
+    stopUpdating();
     if (m_frame && m_frame->document())
         m_frame->document()->setUsingGeolocation(false);
     m_frame = 0;
 }
 
+Geoposition* Geolocation::lastPosition()
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+    if (!m_frame)
+        return 0;
+
+    Page* page = m_frame->page();
+    if (!page)
+        return 0;
+
+    m_lastPosition = createGeoposition(page->geolocationController()->lastPosition());
+#else
+    m_lastPosition = m_service->lastPosition();
+#endif
+
+    return m_lastPosition.get();
+}
+
 void Geolocation::getCurrentPosition(PassRefPtr<PositionCallback> successCallback, PassRefPtr<PositionErrorCallback> errorCallback, PassRefPtr<PositionOptions> options)
 {
     RefPtr<GeoNotifier> notifier = startRequest(successCallback, errorCallback, options);
@@ -184,7 +243,7 @@ PassRefPtr<Geolocation::GeoNotifier> Geolocation::startRequest(PassRefPtr<Positi
     if (isDenied())
         notifier->setFatalError(PositionError::create(PositionError::PERMISSION_DENIED, permissionDeniedErrorMessage));
     else {
-        if (notifier->hasZeroTimeout() || m_service->startUpdating(notifier->m_options.get()))
+        if (notifier->hasZeroTimeout() || startUpdating(notifier->m_options.get()))
             notifier->startTimerIfNeeded();
         else
             notifier->setFatalError(PositionError::create(PositionError::POSITION_UNAVAILABLE, "Failed to start Geolocation service"));
@@ -200,7 +259,7 @@ void Geolocation::fatalErrorOccurred(Geolocation::GeoNotifier* notifier)
     m_watchers.remove(notifier);
 
     if (!hasListeners())
-        m_service->stopUpdating();
+        stopUpdating();
 }
 
 void Geolocation::requestTimedOut(GeoNotifier* notifier)
@@ -209,7 +268,7 @@ void Geolocation::requestTimedOut(GeoNotifier* notifier)
     m_oneShots.remove(notifier);
 
     if (!hasListeners())
-        m_service->stopUpdating();
+        stopUpdating();
 }
 
 void Geolocation::clearWatch(int watchId)
@@ -217,19 +276,7 @@ void Geolocation::clearWatch(int watchId)
     m_watchers.remove(watchId);
     
     if (!hasListeners())
-        m_service->stopUpdating();
-}
-
-void Geolocation::suspend()
-{
-    if (hasListeners())
-        m_service->suspend();
-}
-
-void Geolocation::resume()
-{
-    if (hasListeners())
-        m_service->resume();
+        stopUpdating();
 }
 
 void Geolocation::setIsAllowed(bool allowed)
@@ -319,7 +366,7 @@ void Geolocation::handleError(PositionError* error)
     sendError(watchersCopy, error);
 
     if (!hasListeners())
-        m_service->stopUpdating();
+        stopUpdating();
 }
 
 void Geolocation::requestPermission()
@@ -340,10 +387,9 @@ void Geolocation::requestPermission()
     page->chrome()->requestGeolocationPermissionForFrame(m_frame, this);
 }
 
-void Geolocation::geolocationServicePositionChanged(GeolocationService* service)
+void Geolocation::positionChanged(PassRefPtr<Geoposition> newPosition)
 {
-    ASSERT_UNUSED(service, service == m_service);
-    ASSERT(m_service->lastPosition());
+    m_currentPosition = newPosition;
 
     // Stop all currently running timers.
     stopTimers();
@@ -362,7 +408,7 @@ void Geolocation::geolocationServicePositionChanged(GeolocationService* service)
 
 void Geolocation::makeSuccessCallbacks()
 {
-    ASSERT(m_service->lastPosition());
+    ASSERT(m_currentPosition);
     ASSERT(isAllowed());
     
     Vector<RefPtr<GeoNotifier> > oneShotsCopy;
@@ -376,18 +422,80 @@ void Geolocation::makeSuccessCallbacks()
     // further callbacks to these notifiers.
     m_oneShots.clear();
 
-    sendPosition(oneShotsCopy, m_service->lastPosition());
-    sendPosition(watchersCopy, m_service->lastPosition());
+    sendPosition(oneShotsCopy, m_currentPosition.get());
+    sendPosition(watchersCopy, m_currentPosition.get());
 
     if (!hasListeners())
-        m_service->stopUpdating();
+        stopUpdating();
+}
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+
+void Geolocation::setPosition(GeolocationPosition* position)
+{
+    positionChanged(createGeoposition(position));
+}
+
+void Geolocation::setError(GeolocationError* error)
+{
+    RefPtr<PositionError> positionError = createPositionError(error);
+    handleError(positionError.get());
+}
+
+#else
+
+void Geolocation::geolocationServicePositionChanged(GeolocationService* service)
+{
+    ASSERT_UNUSED(service, service == m_service);
+    ASSERT(m_service->lastPosition());
+
+    positionChanged(m_service->lastPosition());
 }
 
 void Geolocation::geolocationServiceErrorOccurred(GeolocationService* service)
 {
     ASSERT(service->lastError());
-    
+
     handleError(service->lastError());
 }
 
+#endif
+
+bool Geolocation::startUpdating(PositionOptions* options)
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+    // FIXME: Pass options to client.
+    UNUSED_PARAM(options);
+
+    if (!m_frame)
+        return false;
+
+    Page* page = m_frame->page();
+    if (!page)
+        return false;
+
+    page->geolocationController()->addObserver(this);
+    return true;
+#else
+    return m_service->startUpdating(options);
+#endif
+}
+
+void Geolocation::stopUpdating()
+{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+    if (!m_frame)
+        return;
+
+    Page* page = m_frame->page();
+    if (!page)
+        return;
+
+    page->geolocationController()->removeObserver(this);
+#else
+    m_service->stopUpdating();
+#endif
+
+}
+
 } // namespace WebCore
diff --git a/WebCore/page/Geolocation.h b/WebCore/page/Geolocation.h
index 4827664..db513be 100644
--- a/WebCore/page/Geolocation.h
+++ b/WebCore/page/Geolocation.h
@@ -46,22 +46,28 @@ namespace WebCore {
 class Frame;
 class Geoposition;
 
-class Geolocation : public RefCounted<Geolocation>, public GeolocationServiceClient {
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+class GeolocationPosition;
+class GeolocationError;
+#endif
+
+class Geolocation : public RefCounted<Geolocation>
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
+    , public GeolocationServiceClient
+#endif
+{
 public:
     static PassRefPtr<Geolocation> create(Frame* frame) { return adoptRef(new Geolocation(frame)); }
 
-    virtual ~Geolocation() {}
+    virtual ~Geolocation();
 
     void disconnectFrame();
     
-    Geoposition* lastPosition() const { return m_service->lastPosition(); }
+    Geoposition* lastPosition();
 
     void getCurrentPosition(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
     int watchPosition(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
     void clearWatch(int watchId);
-
-    void suspend();
-    void resume();
     
     void setIsAllowed(bool);
     bool isAllowed() const { return m_allowGeolocation == Yes; }
@@ -70,6 +76,11 @@ public:
     void setShouldClearCache(bool shouldClearCache) { m_shouldClearCache = shouldClearCache; }
     bool shouldClearCache() const { return m_shouldClearCache; }
 
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+    void setPostion(GeolocationPosition*);
+    void setError(GeolocationError*);
+#endif
+
 private:
     Geolocation(Frame*);
 
@@ -118,14 +129,22 @@ private:
     void stopTimersForWatchers();
     void stopTimers();
     
+    void positionChanged(PassRefPtr<Geoposition>);
     void makeSuccessCallbacks();
     void handleError(PositionError*);
 
     void requestPermission();
 
+    bool startUpdating(PositionOptions*);
+    void stopUpdating();
+    void suspend();
+    void resume();
+
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
     // GeolocationServiceClient
     virtual void geolocationServicePositionChanged(GeolocationService*);
     virtual void geolocationServiceErrorOccurred(GeolocationService*);
+#endif
 
     PassRefPtr<GeoNotifier> startRequest(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
 
@@ -137,7 +156,11 @@ private:
     GeoNotifierSet m_oneShots;
     Watchers m_watchers;
     Frame* m_frame;
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
     OwnPtr<GeolocationService> m_service;
+#endif
+    RefPtr<Geoposition> m_lastPosition;
+    RefPtr<Geoposition> m_currentPosition;
 
     enum {
         Unknown,
diff --git a/WebCore/page/GeolocationController.cpp b/WebCore/page/GeolocationController.cpp
new file mode 100644
index 0000000..44eba6e
--- /dev/null
+++ b/WebCore/page/GeolocationController.cpp
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GeolocationController.h"
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+
+#include "GeolocationControllerClient.h"
+
+namespace WebCore {
+
+GeolocationController::GeolocationController(Page* page, GeolocationControllerClient* client)
+    : m_page(page)
+    , m_client(client)
+{
+}
+
+GeolocationController::~GeolocationController()
+{
+}
+
+void GeolocationController::addObserver(Geolocation* observer)
+{
+    ASSERT(!m_observers.contains(observer));
+
+    bool wasEmpty = m_observers.isEmpty();
+    m_observers.add(observer);
+    if (wasEmpty)
+        m_client->startUpdating();
+}
+
+void GeolocationController::removeObserver(Geolocation* observer)
+{
+    ASSERT(m_observers.contains(observer));
+
+    m_observers.remove(observer);
+    if (m_observers.isEmpty())
+        m_client->stopUpdating();
+}
+
+void GeolocationController::positionChanged(GeolocationPosition* position)
+{
+    HashSet<RefPtr<Geolocation> >::const_iterator end = m_observers.end();
+    for (HashSet<RefPtr<Geolocation> >::const_iterator it = m_observers.begin(); it != end; ++it)
+        (*it)->setPosition(position);
+}
+
+void GeolocationController::errorOccurred(GeolocationError* error)
+{
+    HashSet<RefPtr<Geolocation> >::const_iterator end = m_observers.end();
+    for (HashSet<RefPtr<Geolocation> >::const_iterator it = m_observers.begin(); it != end; ++it)
+        (*it)->setError(error);
+}
+
+GeolocationPosition* GeolocationController::lastPosition()
+{
+    return m_client->lastPosition();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
diff --git a/WebCore/page/GeolocationController.h b/WebCore/page/GeolocationController.h
new file mode 100644
index 0000000..80f9ca8
--- /dev/null
+++ b/WebCore/page/GeolocationController.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GeolocationController_h
+#define GeolocationController_h
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+
+#include "Geolocation.h"
+#include <wtf/HashSet.h>
+#include <wtf/Noncopyable.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class GeolocationControllerClient;
+class GeolocationError;
+class GeolocationPosition;
+class Page;
+
+class GeolocationController : public Noncopyable {
+public:
+    GeolocationController(Page*, GeolocationControllerClient*);
+    ~GeolocationController();
+
+    void addObserver(Geolocation*);
+    void removeObserver(Geolocation*);
+
+    void positionChanged(GeolocationPosition*);
+    void errorOccurred(GeolocationError*);
+
+    GeolocationPosition* lastPosition();
+
+private:
+    Page* m_page;
+    GeolocationControllerClient* m_client;
+
+    HashSet<RefPtr<Geolocation> > m_observers;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
+
+#endif // GeolocationController_h
diff --git a/WebCore/page/GeolocationControllerClient.h b/WebCore/page/GeolocationControllerClient.h
new file mode 100644
index 0000000..830c64b
--- /dev/null
+++ b/WebCore/page/GeolocationControllerClient.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GeolocationControllerClient_h
+#define GeolocationControllerClient_h
+
+namespace WebCore {
+
+class GeolocationPosition;
+
+class GeolocationControllerClient {
+public:
+    virtual void startUpdating() = 0;
+    virtual void stopUpdating() = 0;
+    virtual GeolocationPosition* lastPosition() = 0;
+
+protected:
+    virtual ~GeolocationControllerClient() { }
+};
+
+} // namespace WebCore
+
+#endif // GeolocationControllerClient_h
diff --git a/WebCore/page/GeolocationError.h b/WebCore/page/GeolocationError.h
new file mode 100644
index 0000000..9761ca6
--- /dev/null
+++ b/WebCore/page/GeolocationError.h
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GeolocationError_h
+#define GeolocationError_h
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+
+#include "PlatformString.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class GeolocationError : public RefCounted<GeolocationError> {
+public:
+    enum ErrorCode {
+        PermissionDenied,
+        PositionUnavailable
+    };
+
+    static PassRefPtr<GeolocationError> create(ErrorCode code, const String& message) { return adoptRef(new GeolocationError(code, message)); }
+
+    ErrorCode code() const { return m_code; }
+    const String& message() const { return m_message; }
+
+private:
+    GeolocationError(ErrorCode code, const String& message);
+
+    ErrorCode m_code;
+    String m_message; 
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
+
+#endif // GeolocationError_h
diff --git a/WebCore/page/GeolocationPosition.h b/WebCore/page/GeolocationPosition.h
new file mode 100644
index 0000000..c31e9c4
--- /dev/null
+++ b/WebCore/page/GeolocationPosition.h
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2009 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GeolocationPosition_h
+#define GeolocationPosition_h
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class GeolocationPosition : public RefCounted<GeolocationPosition> {
+public:
+    static PassRefPtr<GeolocationPosition> create(double timestamp, double latitude, double longitude, double accuracy) { return adoptRef(new GeolocationPosition(timestamp, latitude, longitude, accuracy)); }
+
+    static PassRefPtr<GeolocationPosition> create(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed) { return adoptRef(new GeolocationPosition(timestamp, latitude, longitude, accuracy, providesAltitude, altitude, providesAltitudeAccuracy, altitudeAccuracy, providesHeading, heading, providesSpeed, speed)); }
+
+    double timestamp() const { return m_timestamp; }
+
+    double latitude() const { return m_latitude; }
+    double longitude() const { return m_longitude; }
+    double accuracy() const { return m_accuracy; }
+    double altitude() const { return m_altitude; }
+    double altitudeAccuracy() const { return m_altitudeAccuracy; }
+    double heading() const { return m_heading; }
+    double speed() const { return m_speed; }
+
+    bool canProvideAltitude() const { return m_canProvideAltitude; }
+    bool canProvideAltitudeAccuracy() const { return m_canProvideAltitudeAccuracy; }
+    bool canProvideHeading() const { return m_canProvideHeading; }
+    bool canProvideSpeed() const { return m_canProvideSpeed; }
+
+private:
+    GeolocationPosition(double timestamp, double latitude, double longitude, double accuracy)
+        : m_timestamp(timestamp)
+        , m_latitude(latitude)
+        , m_longitude(longitude)
+        , m_accuracy(accuracy)
+        , m_altitude(0)
+        , m_altitudeAccuracy(0)
+        , m_heading(0)
+        , m_speed(0)
+        , m_canProvideAltitude(false)
+        , m_canProvideAltitudeAccuracy(false)
+        , m_canProvideHeading(false)
+        , m_canProvideSpeed(false)
+    {
+    }
+
+    GeolocationPosition(double timestamp, double latitude, double longitude, double accuracy, bool providesAltitude, double altitude, bool providesAltitudeAccuracy, double altitudeAccuracy, bool providesHeading, double heading, bool providesSpeed, double speed)
+        : m_timestamp(timestamp)
+        , m_latitude(latitude)
+        , m_longitude(longitude)
+        , m_accuracy(accuracy)
+        , m_altitude(altitude)
+        , m_altitudeAccuracy(altitudeAccuracy)
+        , m_heading(heading)
+        , m_speed(speed)
+        , m_canProvideAltitude(providesAltitude)
+        , m_canProvideAltitudeAccuracy(providesAltitudeAccuracy)
+        , m_canProvideHeading(providesHeading)
+        , m_canProvideSpeed(providesSpeed)
+    {
+    }
+
+    double m_timestamp;
+
+    double m_latitude;
+    double m_longitude;
+    double m_accuracy;
+    double m_altitude;
+    double m_altitudeAccuracy;
+    double m_heading;
+    double m_speed;
+
+    bool m_canProvideAltitude;
+    bool m_canProvideAltitudeAccuracy;
+    bool m_canProvideHeading;
+    bool m_canProvideSpeed;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
+
+#endif // GeolocationPosition_h
diff --git a/WebCore/page/Geoposition.h b/WebCore/page/Geoposition.h
index f3c703b..8b215b1 100644
--- a/WebCore/page/Geoposition.h
+++ b/WebCore/page/Geoposition.h
@@ -37,8 +37,11 @@ typedef int ExceptionCode;
 
 class Geoposition : public RefCounted<Geoposition> {
 public:
-    static PassRefPtr<Geoposition> create(PassRefPtr<Coordinates> coordinates, DOMTimeStamp timestamp) { return adoptRef(new Geoposition(coordinates, timestamp)); }
-    
+    static PassRefPtr<Geoposition> create(PassRefPtr<Coordinates> coordinates, DOMTimeStamp timestamp)
+    {
+        return adoptRef(new Geoposition(coordinates, timestamp));
+    }
+
     DOMTimeStamp timestamp() const { return m_timestamp; }
     Coordinates* coords() const { return m_coordinates.get(); }
     
diff --git a/WebCore/page/Page.cpp b/WebCore/page/Page.cpp
index c4f33d6..1a035a5 100644
--- a/WebCore/page/Page.cpp
+++ b/WebCore/page/Page.cpp
@@ -77,6 +77,10 @@
 #include "WMLPageState.h"
 #endif
 
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+#include "GeolocationController.h"
+#endif
+
 namespace WebCore {
 
 static HashSet<Page*>* allPages;
@@ -101,7 +105,7 @@ static void networkStateChanged()
         frames[i]->document()->dispatchWindowEvent(Event::create(eventName, false, false));
 }
 
-Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, EditorClient* editorClient, DragClient* dragClient, InspectorClient* inspectorClient, PluginHalterClient* pluginHalterClient)
+Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, EditorClient* editorClient, DragClient* dragClient, InspectorClient* inspectorClient, PluginHalterClient* pluginHalterClient, GeolocationControllerClient* geolocationControllerClient)
     : m_chrome(new Chrome(this, chromeClient))
     , m_dragCaretController(new SelectionController(0, true))
 #if ENABLE(DRAG_SUPPORT)
@@ -114,6 +118,9 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
 #if ENABLE(INSPECTOR)
     , m_inspectorController(new InspectorController(this, inspectorClient))
 #endif
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+    , m_geolocationController(new GeolocationController(this, geolocationControllerClient))
+#endif
     , m_settings(new Settings(this))
     , m_progress(new ProgressTracker)
     , m_backForwardList(BackForwardList::create(this))
@@ -148,6 +155,10 @@ Page::Page(ChromeClient* chromeClient, ContextMenuClient* contextMenuClient, Edi
 #if !ENABLE(INSPECTOR)
     UNUSED_PARAM(inspectorClient);
 #endif
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
+    UNUSED_PARAM(geolocationControllerClient);
+#endif
+
     if (!allPages) {
         allPages = new HashSet<Page*>;
         
diff --git a/WebCore/page/Page.h b/WebCore/page/Page.h
index 4886464..40d96a7 100644
--- a/WebCore/page/Page.h
+++ b/WebCore/page/Page.h
@@ -54,6 +54,8 @@ namespace WebCore {
     class EditorClient;
     class FocusController;
     class Frame;
+    class GeolocationController;
+    class GeolocationControllerClient;
     class HaltablePlugin;
     class InspectorClient;
     class InspectorController;
@@ -85,7 +87,7 @@ namespace WebCore {
     public:
         static void setNeedsReapplyStyles();
 
-        Page(ChromeClient*, ContextMenuClient*, EditorClient*, DragClient*, InspectorClient*, PluginHalterClient*);
+        Page(ChromeClient*, ContextMenuClient*, EditorClient*, DragClient*, InspectorClient*, PluginHalterClient*, GeolocationControllerClient*);
         ~Page();
 
         RenderTheme* theme() const { return m_theme.get(); };
@@ -144,6 +146,9 @@ namespace WebCore {
 #if ENABLE(INSPECTOR)
         InspectorController* inspectorController() const { return m_inspectorController.get(); }
 #endif
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+        GeolocationController* geolocationController() const { return m_geolocationController.get(); }
+#endif
         Settings* settings() const { return m_settings.get(); }
         ProgressTracker* progress() const { return m_progress.get(); }
 
@@ -250,6 +255,9 @@ namespace WebCore {
 #if ENABLE(INSPECTOR)
         OwnPtr<InspectorController> m_inspectorController;
 #endif
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+        OwnPtr<GeolocationController> m_geolocationController;
+#endif
         OwnPtr<Settings> m_settings;
         OwnPtr<ProgressTracker> m_progress;
         
diff --git a/WebCore/svg/graphics/SVGImage.cpp b/WebCore/svg/graphics/SVGImage.cpp
index 976786a..4d2c902 100644
--- a/WebCore/svg/graphics/SVGImage.cpp
+++ b/WebCore/svg/graphics/SVGImage.cpp
@@ -245,7 +245,7 @@ bool SVGImage::dataChanged(bool allDataReceived)
         // FIXME: If this SVG ends up loading itself, we might leak the world.
         // The comment said that the Cache code does not know about CachedImages
         // holding Frames and won't know to break the cycle. But 
-        m_page.set(new Page(m_chromeClient.get(), dummyContextMenuClient, dummyEditorClient, dummyDragClient, dummyInspectorClient, 0));
+        m_page.set(new Page(m_chromeClient.get(), dummyContextMenuClient, dummyEditorClient, dummyDragClient, dummyInspectorClient, 0, 0));
         m_page->settings()->setJavaScriptEnabled(false);
         m_page->settings()->setPluginsEnabled(false);
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 3bf2391..d5d5c2d 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-13  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Dan Bernstein.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
+        Add client based Geolocation provider
+
+        Add first cut of a client based Geolocation provider. This is guarded by
+        ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
+        GeolocationControllerClient interface that no-one currently implements,
+        but will in a subsequent patch.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::WebViewImpl):
+
 2009-12-13  Charles Reis  <creis at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 357cdca..030c4bd 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -229,6 +229,7 @@ WebViewImpl::WebViewImpl(WebViewClient* client)
                         &m_editorClientImpl,
                         &m_dragClientImpl,
                         &m_inspectorClientImpl,
+                        0,
                         0));
 
     m_page->backForwardList()->setClient(&m_backForwardListClientImpl);
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index e06b2a7..1016052 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-13  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Dan Bernstein.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
+        Add client based Geolocation provider
+
+        Add first cut of a client based Geolocation provider. This is guarded by
+        ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
+        GeolocationControllerClient interface that no-one currently implements,
+        but will in a subsequent patch.
+
+        * webkit/webkitwebview.cpp:
+        (webkit_web_view_init):
+
 2009-12-14  Gustavo Noronha Silva  <gustavo.noronha at collabora.co.uk>
 
         Reviewed by Xan Lopez.
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 0447c9c..790d088 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -2609,7 +2609,7 @@ static void webkit_web_view_init(WebKitWebView* webView)
     priv->imContext = gtk_im_multicontext_new();
 
     WebKit::InspectorClient* inspectorClient = new WebKit::InspectorClient(webView);
-    priv->corePage = new Page(new WebKit::ChromeClient(webView), new WebKit::ContextMenuClient(webView), new WebKit::EditorClient(webView), new WebKit::DragClient(webView), inspectorClient, 0);
+    priv->corePage = new Page(new WebKit::ChromeClient(webView), new WebKit::ContextMenuClient(webView), new WebKit::EditorClient(webView), new WebKit::DragClient(webView), inspectorClient, 0, 0);
 
     // We also add a simple wrapper class to provide the public
     // interface for the Web Inspector.
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index b05f2a8..ee545bd 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-13  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Dan Bernstein.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
+        Add client based Geolocation provider
+
+        Add first cut of a client based Geolocation provider. This is guarded by
+        ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
+        GeolocationControllerClient interface that no-one currently implements,
+        but will in a subsequent patch.
+
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
 2009-12-10  Jon Honeycutt  <jhoneycutt at apple.com>
 
         Mac build fix. Unreviewed.
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 33ea069..ad8f33a 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -607,7 +607,7 @@ static bool runningTigerMail()
         didOneTimeInitialization = true;
     }
 
-    _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self));
+    _private->page = new Page(new WebChromeClient(self), new WebContextMenuClient(self), new WebEditorClient(self), new WebDragClient(self), new WebInspectorClient(self), new WebPluginHalterClient(self), 0);
 
     _private->page->settings()->setLocalStorageDatabasePath([[self preferences] _localStorageDatabasePath]);
 
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index d3ba37a..4febc93 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -381,7 +381,7 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
     contextMenuClient = new ContextMenuClientQt();
     editorClient = new EditorClientQt(q);
     page = new Page(chromeClient, contextMenuClient, editorClient,
-                    new DragClientQt(q), new InspectorClientQt(q), 0);
+                    new DragClientQt(q), new InspectorClientQt(q), 0, 0);
 
     settings = new QWebSettings(page->settings());
 
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 0902492..07fd795 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-13  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Dan Bernstein.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
+        Add client based Geolocation provider
+
+        Add first cut of a client based Geolocation provider. This is guarded by
+        ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
+        GeolocationControllerClient interface that no-one currently implements,
+        but will in a subsequent patch.
+
+        * Api/qwebpage.cpp:
+        (QWebPagePrivate::QWebPagePrivate):
+
 2009-12-13  Benjamin Poulain  <benjamin.poulain at nokia.com>
 
         Reviewed by Simon Hausmann.
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 742c325..4658fc7 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-13  Sam Weinig  <sam at webkit.org>
+
+        Reviewed by Dan Bernstein.
+
+        Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
+        Add client based Geolocation provider
+
+        Add first cut of a client based Geolocation provider. This is guarded by
+        ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
+        GeolocationControllerClient interface that no-one currently implements,
+        but will in a subsequent patch.
+
+        * WebView.cpp:
+        (WebView::initWithFrame):
+
 2009-12-14  Adam Roben  <aroben at apple.com>
 
         Change IWebFramePrivate's vtable to be compatible with Safari 4.0.4
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 07f8295..0db6a48 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -2394,7 +2394,7 @@ HRESULT STDMETHODCALLTYPE WebView::initWithFrame(
     if (SUCCEEDED(m_preferences->shouldUseHighResolutionTimers(&useHighResolutionTimer)))
         Settings::setShouldUseHighResolutionTimers(useHighResolutionTimer);
 
-    m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this));
+    m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this), new WebPluginHalterClient(this), 0);
 
     BSTR localStoragePath;
     if (SUCCEEDED(m_preferences->localStorageDatabasePath(&localStoragePath))) {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list