Title: [136162] trunk/Source/WebKit/blackberry
Revision
136162
Author
[email protected]
Date
2012-11-29 14:13:29 -0800 (Thu, 29 Nov 2012)

Log Message

[BlackBerry] Modifying GeoClientBlackBerry to switch between high and low accuracy
https://bugs.webkit.org/show_bug.cgi?id=103666

Patch by Otto Derek Cheung <[email protected]> on 2012-11-29
Reviewed by Yong Li.

Internally reviewed by Yong Li.

PR 243420

Updating GeolocationClientBlackBerry to switch accuracy when GeolocationController
calls setEnableHighAccuracy.

* WebCoreSupport/GeolocationClientBlackBerry.cpp:
(GeolocationClientBlackBerry::startUpdating):
(GeolocationClientBlackBerry::setEnableHighAccuracy):

Modified Paths

Diff

Modified: trunk/Source/WebKit/blackberry/ChangeLog (136161 => 136162)


--- trunk/Source/WebKit/blackberry/ChangeLog	2012-11-29 21:52:08 UTC (rev 136161)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2012-11-29 22:13:29 UTC (rev 136162)
@@ -1,3 +1,21 @@
+2012-11-29  Otto Derek Cheung  <[email protected]>
+
+        [BlackBerry] Modifying GeoClientBlackBerry to switch between high and low accuracy
+        https://bugs.webkit.org/show_bug.cgi?id=103666
+
+        Reviewed by Yong Li.
+
+        Internally reviewed by Yong Li.
+
+        PR 243420
+
+        Updating GeolocationClientBlackBerry to switch accuracy when GeolocationController
+        calls setEnableHighAccuracy.
+
+        * WebCoreSupport/GeolocationClientBlackBerry.cpp:
+        (GeolocationClientBlackBerry::startUpdating):
+        (GeolocationClientBlackBerry::setEnableHighAccuracy):
+
 2012-11-29  Andrew Lo  <[email protected]>
 
         [BlackBerry] Do not adjust scroll position on viewport resizes that are not orientation change related

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp (136161 => 136162)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp	2012-11-29 21:52:08 UTC (rev 136161)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationClientBlackBerry.cpp	2012-11-29 22:13:29 UTC (rev 136162)
@@ -52,7 +52,7 @@
 void GeolocationClientBlackBerry::startUpdating()
 {
     if (!m_isActive)
-        BlackBerry::Platform::GeolocationHandler::instance()->addListener(this, false);
+        BlackBerry::Platform::GeolocationHandler::instance()->addListener(this);
     m_isActive = true;
 }
 
@@ -129,7 +129,9 @@
 
 void GeolocationClientBlackBerry::setEnableHighAccuracy(bool newAccuracy)
 {
-    // FIXME: we have to implement high accuracy on our side too
-    m_accuracy = newAccuracy;
+    if (m_accuracy != newAccuracy) {
+        m_accuracy = newAccuracy;
+        BlackBerry::Platform::GeolocationHandler::instance()->switchAccuracy(this);
+    }
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to