WebCore:
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Mar 2009 01:47:14 +0000 (01:47 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 3 Mar 2009 01:47:14 +0000 (01:47 +0000)
commitcd03a4a213111b399ae2005c2c7b7d2fd5769df8
tree12f67293c89359769ddc60632a28d42b44a64319
parentf4e99e0ae5a7512e2e09f7b5acfb1b308a866f36
WebCore:

2009-03-02  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoffrey Garen.

        Fix for <rdar://problem/6507404> Add Geolocation support.

        This is not yet turned on for any Mac platform.

        * WebCore.xcodeproj/project.pbxproj:
        * page/Chrome.cpp:
        (WebCore::Chrome::shouldAllowGeolocationForFrame):
        * page/Chrome.h:
        * page/ChromeClient.h:
        (WebCore::ChromeClient::shouldAllowGeolocationForFrame):
        * page/Geolocation.cpp:
        (WebCore::Geolocation::Geolocation):
        (WebCore::Geolocation::disconnectFrame): Remove call to setUsingGeolocation as the document
        will not be alive at this point.
        (WebCore::Geolocation::getCurrentPosition): Check if the embedding app allows geolocation and
        return a PERMISSION_DENIED if not.
        (WebCore::Geolocation::watchPosition): Ditto.
        (WebCore::Geolocation::shouldAllowGeolocation): Perform request to embedding layer of whether
        to allow geolocation and cache the result.
        * page/Geolocation.h:
        (WebCore::Geolocation::):
        * platform/GeolocationService.cpp:
        * platform/GeolocationService.h:
        (WebCore::GeolocationService::~GeolocationService):
        (WebCore::GeolocationService::stopUpdating):
        * platform/mac/GeolocationServiceMac.h: Added.
        (WebCore::GeolocationServiceMac::lastPosition):
        (WebCore::GeolocationServiceMac::lastError):
        * platform/mac/GeolocationServiceMac.mm: Added.
        (WebCore::GeolocationService::create):
        (WebCore::GeolocationServiceMac::GeolocationServiceMac):
        (WebCore::GeolocationServiceMac::~GeolocationServiceMac):
        (WebCore::GeolocationServiceMac::startUpdating):
        (WebCore::GeolocationServiceMac::stopUpdating):
        (WebCore::GeolocationServiceMac::suspend):
        (WebCore::GeolocationServiceMac::resume):
        (WebCore::GeolocationServiceMac::positionChanged):
        (WebCore::GeolocationServiceMac::errorOccurred):
        (-[WebCoreCoreLocationObserver initWithCallback:]):
        (-[WebCoreCoreLocationObserver locationManager:didUpdateToLocation:fromLocation:]):
        (-[WebCoreCoreLocationObserver locationManager:didFailWithError:]):

WebKit/mac:

2009-03-02  Sam Weinig  <sam@webkit.org>

        Reviewed by Geoffrey Garen.

        Fix for <rdar://problem/6507404> Add Geolocation support.

        This is not yet turned on for any Mac platform.

        Add SPI to ask the embedding application whether to allow
        Geolocation for an origin.

        * WebCoreSupport/WebChromeClient.h:
        * WebCoreSupport/WebChromeClient.mm:
        (WebChromeClient::shouldAllowGeolocationForFrame):
        * WebView/WebUIDelegatePrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/page/Chrome.cpp
WebCore/page/Chrome.h
WebCore/page/ChromeClient.h
WebCore/page/Geolocation.cpp
WebCore/page/Geolocation.h
WebCore/platform/GeolocationService.cpp
WebCore/platform/GeolocationService.h
WebCore/platform/mac/GeolocationServiceMac.h [new file with mode: 0644]
WebCore/platform/mac/GeolocationServiceMac.mm [new file with mode: 0644]
WebKit/mac/ChangeLog
WebKit/mac/WebCoreSupport/WebChromeClient.h
WebKit/mac/WebCoreSupport/WebChromeClient.mm
WebKit/mac/WebView/WebUIDelegatePrivate.h