summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-01-12 13:10:51 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-01-12 13:10:51 -0800
commitb12e415358bcbd05620d883de6476579b46b1203 (patch)
tree46babd497b78e8f216afe9b2f6df74de98254b73 /WebCore/platform
parentfc243b5053a64b21692cdb7380abe24095434f85 (diff)
parentfb651c68fc3c15b61a70f200fd98cf32b01c174d (diff)
downloadexternal_webkit-b12e415358bcbd05620d883de6476579b46b1203.zip
external_webkit-b12e415358bcbd05620d883de6476579b46b1203.tar.gz
external_webkit-b12e415358bcbd05620d883de6476579b46b1203.tar.bz2
Merge "resolved conflicts for merge of e0286f66 to master"
Diffstat (limited to 'WebCore/platform')
-rw-r--r--WebCore/platform/android/GeolocationServiceAndroid.cpp10
-rw-r--r--WebCore/platform/android/PlatformBridge.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/WebCore/platform/android/GeolocationServiceAndroid.cpp b/WebCore/platform/android/GeolocationServiceAndroid.cpp
index 43a8f5f..3ffb9b9 100644
--- a/WebCore/platform/android/GeolocationServiceAndroid.cpp
+++ b/WebCore/platform/android/GeolocationServiceAndroid.cpp
@@ -28,6 +28,7 @@
#include "GeolocationServiceBridge.h"
#include "Geoposition.h"
+#include "PlatformBridge.h"
#include "PositionError.h"
#include "PositionOptions.h"
@@ -83,8 +84,13 @@ bool GeolocationServiceAndroid::startUpdating(PositionOptions* options)
if (options->enableHighAccuracy())
m_javaBridge->setEnableGps(true);
- if (!haveJavaBridge)
- m_javaBridge->start();
+ // We need only start the service when it's first created.
+ 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())
+ m_javaBridge->start();
+ }
return true;
}
diff --git a/WebCore/platform/android/PlatformBridge.h b/WebCore/platform/android/PlatformBridge.h
index a1ed50a..a73abab 100644
--- a/WebCore/platform/android/PlatformBridge.h
+++ b/WebCore/platform/android/PlatformBridge.h
@@ -71,6 +71,8 @@ public:
static void immediateRepaint(const FrameView* view);
#endif // USE(ACCELERATED_COMPOSITING)
+ // Whether the WebView is paused.
+ static bool isWebViewPaused();
};
}