diff options
author | Steve Block <steveblock@google.com> | 2010-02-18 06:37:45 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-02-18 06:37:45 -0800 |
commit | c7c7c3dc7fcdc5bff8c781d66a6d181eddf7c035 (patch) | |
tree | 9dd0d176195fc953a5dfaca6926bbddb05e749ad /WebCore/platform | |
parent | 9c8b266fb74dbb8b53cf7b4ad9997a6c6ff09305 (diff) | |
parent | 930792dfdde9ad0fac3251ab70eb00d97f2fe88d (diff) | |
download | external_webkit-c7c7c3dc7fcdc5bff8c781d66a6d181eddf7c035.zip external_webkit-c7c7c3dc7fcdc5bff8c781d66a6d181eddf7c035.tar.gz external_webkit-c7c7c3dc7fcdc5bff8c781d66a6d181eddf7c035.tar.bz2 |
Merge "Fixes a bug with the Geolocation suspend/resume behaviour"
Diffstat (limited to 'WebCore/platform')
-rw-r--r-- | WebCore/platform/GeolocationService.h | 5 | ||||
-rw-r--r-- | WebCore/platform/android/GeolocationServiceAndroid.cpp | 9 | ||||
-rw-r--r-- | WebCore/platform/android/GeolocationServiceAndroid.h | 4 | ||||
-rw-r--r-- | WebCore/platform/android/PlatformBridge.h | 4 | ||||
-rw-r--r-- | WebCore/platform/mock/GeolocationServiceMock.cpp | 5 | ||||
-rwxr-xr-x | WebCore/platform/mock/GeolocationServiceMock.h | 5 |
6 files changed, 27 insertions, 5 deletions
diff --git a/WebCore/platform/GeolocationService.h b/WebCore/platform/GeolocationService.h index cebf313..f991f67 100644 --- a/WebCore/platform/GeolocationService.h +++ b/WebCore/platform/GeolocationService.h @@ -47,7 +47,12 @@ public: static GeolocationService* create(GeolocationServiceClient*); virtual ~GeolocationService() { } +#if PLATFORM(ANDROID) + // TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 + virtual bool startUpdating(PositionOptions*, bool suspend) { return false; } +#else virtual bool startUpdating(PositionOptions*) { return false; } +#endif virtual void stopUpdating() { } virtual void suspend() { } diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp index 3d45e75..aaa7af7 100644 --- a/WebCore/platform/android/GeolocationServiceAndroid.cpp +++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp @@ -28,7 +28,6 @@ #include "GeolocationServiceBridge.h" #include "Geoposition.h" -#include "PlatformBridge.h" #include "PositionError.h" #include "PositionOptions.h" @@ -66,7 +65,9 @@ GeolocationServiceAndroid::GeolocationServiceAndroid(GeolocationServiceClient* c { } -bool GeolocationServiceAndroid::startUpdating(PositionOptions* options) +// ANDROID +// TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 +bool GeolocationServiceAndroid::startUpdating(PositionOptions* options, bool suspend) { // This method is called every time a new watch or one-shot position request // is started. If we already have a position or an error, call back @@ -92,7 +93,9 @@ bool GeolocationServiceAndroid::startUpdating(PositionOptions* options) if (!haveJavaBridge) { // If the browser is paused, don't start the service. It will be started // when we get the call to resume. - if (!PlatformBridge::isWebViewPaused()) + // ANDROID + // TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 + if (!suspend) m_javaBridge->start(); } diff --git a/WebCore/platform/android/GeolocationServiceAndroid.h b/WebCore/platform/android/GeolocationServiceAndroid.h index b2be750..72532f6 100644 --- a/WebCore/platform/android/GeolocationServiceAndroid.h +++ b/WebCore/platform/android/GeolocationServiceAndroid.h @@ -45,7 +45,9 @@ public: virtual ~GeolocationServiceAndroid() { }; - virtual bool startUpdating(PositionOptions*); + // ANDROID + // TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 + virtual bool startUpdating(PositionOptions*, bool suspend); virtual void stopUpdating(); virtual Geoposition* lastPosition() const { return m_lastPosition.get(); } diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h index 5eb127f..0918fe9 100644 --- a/WebCore/platform/android/PlatformBridge.h +++ b/WebCore/platform/android/PlatformBridge.h @@ -126,7 +126,9 @@ public: #endif // USE(ACCELERATED_COMPOSITING) // Whether the WebView is paused. - static bool isWebViewPaused(); + // ANDROID + // TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 + static bool isWebViewPaused(const FrameView*); }; } diff --git a/WebCore/platform/mock/GeolocationServiceMock.cpp b/WebCore/platform/mock/GeolocationServiceMock.cpp index f187104..0104747 100644 --- a/WebCore/platform/mock/GeolocationServiceMock.cpp +++ b/WebCore/platform/mock/GeolocationServiceMock.cpp @@ -78,7 +78,12 @@ void GeolocationServiceMock::setError(PassRefPtr<PositionError> error) makeGeolocationCallbackFromAllInstances(); } +#if PLATFORM(ANDROID) +// TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 +bool GeolocationServiceMock::startUpdating(PositionOptions*, bool /* suspend */) +#else bool GeolocationServiceMock::startUpdating(PositionOptions*) +#endif { m_isActive = true; m_timer.startOneShot(0); diff --git a/WebCore/platform/mock/GeolocationServiceMock.h b/WebCore/platform/mock/GeolocationServiceMock.h index 7d02797..1b4db93 100755 --- a/WebCore/platform/mock/GeolocationServiceMock.h +++ b/WebCore/platform/mock/GeolocationServiceMock.h @@ -46,7 +46,12 @@ class GeolocationServiceMock : public GeolocationService { GeolocationServiceMock(GeolocationServiceClient*); virtual ~GeolocationServiceMock(); +#if PLATFORM(ANDROID) + // TODO: Upstream to webkit.org. See https://bugs.webkit.org/show_bug.cgi?id=34082 + virtual bool startUpdating(PositionOptions*, bool suspend); +#else virtual bool startUpdating(PositionOptions*); +#endif virtual void stopUpdating(); static void setPosition(PassRefPtr<Geoposition> position); |