summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-09-03 10:19:37 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-09-03 10:19:37 -0700
commit94c1489ecc5f8b0d4c78cd4960a2d14679fba38b (patch)
treef379046769d288dc718d5ddbc3ec87b72ee11951 /WebKit
parent2bb8c3514e2062c0a533f101ba32a7b861605152 (diff)
parentf7d703686fcbad876e7ce6d21a52d9a6cd71d2e8 (diff)
downloadexternal_webkit-94c1489ecc5f8b0d4c78cd4960a2d14679fba38b.zip
external_webkit-94c1489ecc5f8b0d4c78cd4960a2d14679fba38b.tar.gz
external_webkit-94c1489ecc5f8b0d4c78cd4960a2d14679fba38b.tar.bz2
Merge change 23630 into eclair
* changes: Brings Mock Geolocation service up to date with latest submission to WebKit.
Diffstat (limited to 'WebKit')
-rwxr-xr-xWebKit/android/jni/MockGeolocation.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/WebKit/android/jni/MockGeolocation.cpp b/WebKit/android/jni/MockGeolocation.cpp
index 2f6ca60..8c5f966 100755
--- a/WebKit/android/jni/MockGeolocation.cpp
+++ b/WebKit/android/jni/MockGeolocation.cpp
@@ -30,10 +30,10 @@
#include <JNIHelp.h>
#include "Coordinates.h"
-#include "GeolocationService.h"
#include "Geoposition.h"
#include "JavaSharedClient.h"
#include "jni_utility.h"
+#include "MockGeolocationService.h"
#include "PositionError.h"
#include "WebCoreJni.h"
#include <wtf/CurrentTime.h>
@@ -54,31 +54,15 @@ static void setPosition(JNIEnv* env, jobject, double latitude, double longitude,
false, 0.0, // heading
false, 0.0); // speed
RefPtr<Geoposition> position = Geoposition::create(coordinates.release(), WTF::currentTime());
- GeolocationService::setMockPosition(position.release());
+ MockGeolocationService::setPosition(position.release());
}
static void setError(JNIEnv* env, jobject, int code, jstring message)
{
- PositionError::ErrorCode codeEnum;
- switch (code) {
- case PositionError::UNKNOWN_ERROR:
- codeEnum = PositionError::UNKNOWN_ERROR;
- break;
- case PositionError::PERMISSION_DENIED:
- codeEnum = PositionError::PERMISSION_DENIED;
- break;
- case PositionError::POSITION_UNAVAILABLE:
- codeEnum = PositionError::POSITION_UNAVAILABLE;
- break;
- case PositionError::TIMEOUT:
- codeEnum = PositionError::TIMEOUT;
- break;
- default:
- ASSERT(false);
- }
+ PositionError::ErrorCode codeEnum = static_cast<PositionError::ErrorCode>(code);
String messageString = to_string(env, message);
RefPtr<PositionError> error = PositionError::create(codeEnum, messageString);
- GeolocationService::setMockError(error.release());
+ MockGeolocationService::setError(error.release());
}
static JNINativeMethod gMockGeolocationMethods[] = {