OSDN Git Service

Fixes a couple of style problems and a minor TODO in WebKit Geolocation.
authorSteve Block <steveblock@google.com>
Tue, 6 Oct 2009 11:52:52 +0000 (12:52 +0100)
committerSteve Block <steveblock@google.com>
Tue, 6 Oct 2009 11:52:52 +0000 (12:52 +0100)
WebCore/platform/android/GeolocationServiceAndroid.cpp
WebCore/platform/android/GeolocationServiceAndroid.h

index 9dcef6f..9e1c919 100644 (file)
@@ -29,7 +29,6 @@
 #include <JNIHelp.h>  // For jniRegisterNativeMethods
 #include <jni_utility.h>  // For getJNIEnv
 
-#include "Frame.h"
 #include "Geoposition.h"
 #include "PositionError.h"
 #include "PositionOptions.h"
@@ -300,9 +299,8 @@ bool GeolocationServiceAndroid::startUpdating(PositionOptions* options)
 
     // On Android, high power == GPS. Set whether to use GPS before we start the
     // implementation.
-    // FIXME: Checking for the presence of options will probably not be required
-    // once WebKit bug 27254 is fixed.
-    if (options && options->enableHighAccuracy())
+    ASSERT(options);
+    if (options->enableHighAccuracy())
         m_javaBridge->setEnableGps(true);
 
     if (!haveJavaBridge)
@@ -346,7 +344,8 @@ void GeolocationServiceAndroid::newErrorAvailable(PassRefPtr<PositionError> erro
     errorOccurred();
 }
 
-void GeolocationServiceAndroid::timerFired(Timer<GeolocationServiceAndroid>* timer) {
+void GeolocationServiceAndroid::timerFired(Timer<GeolocationServiceAndroid>* timer)
+{
     ASSERT(&m_timer == timer);
     ASSERT(m_lastPosition || m_lastError);
     if (m_lastPosition)
index 90a8864..f233f9a 100644 (file)
@@ -43,7 +43,6 @@ namespace WebCore {
     public:
         static GeolocationService* create(GeolocationServiceClient*);
 
-        GeolocationServiceAndroid(GeolocationServiceClient*);
         virtual ~GeolocationServiceAndroid() {};
 
         virtual bool startUpdating(PositionOptions*);
@@ -58,6 +57,8 @@ namespace WebCore {
         void timerFired(Timer<GeolocationServiceAndroid>* timer);
 
     private:
+        GeolocationServiceAndroid(GeolocationServiceClient*);
+
         static bool isPositionMovement(Geoposition* position1, Geoposition* position2);
         static bool isPositionMoreAccurate(Geoposition* position1, Geoposition* position2);
         static bool isPositionMoreTimely(Geoposition* position1, Geoposition* position2);