[BlackBerry] Use WebPagePrivate instead of WebPage in GeolocationControllerClientBlac...
authorleo.yang@torchmobile.com.cn <leo.yang@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 05:09:11 +0000 (05:09 +0000)
committerleo.yang@torchmobile.com.cn <leo.yang@torchmobile.com.cn@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 Feb 2012 05:09:11 +0000 (05:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77927

Reviewed by Antonio Gomes.

WebKit/blackberry/Api/WebPage which has a d pointer is designed for public API.
GeolocationControllerClientBlackBerry in WebKit/blackberry/WebCoreSupport should
use the d pointer directly because the client is internal implementation.

No functionalities changed, no new tests.

* blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
(GeolocationControllerClientBlackBerry::GeolocationControllerClientBlackBerry):
(GeolocationControllerClientBlackBerry::requestPermission):
(GeolocationControllerClientBlackBerry::cancelPermissionRequest):
(GeolocationControllerClientBlackBerry::onLocationUpdate):
(GeolocationControllerClientBlackBerry::onLocationError):
* blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h:
(WebKit):
(GeolocationControllerClientBlackBerry):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106903 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp
Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h

index d4e53bd..4861623 100644 (file)
@@ -1,3 +1,26 @@
+2012-02-06  Leo Yang  <leo.yang@torchmobile.com.cn>
+
+        [BlackBerry] Use WebPagePrivate instead of WebPage in GeolocationControllerClientBlackBerry
+        https://bugs.webkit.org/show_bug.cgi?id=77927
+
+        Reviewed by Antonio Gomes.
+
+        WebKit/blackberry/Api/WebPage which has a d pointer is designed for public API.
+        GeolocationControllerClientBlackBerry in WebKit/blackberry/WebCoreSupport should
+        use the d pointer directly because the client is internal implementation.
+
+        No functionalities changed, no new tests.
+
+        * blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp:
+        (GeolocationControllerClientBlackBerry::GeolocationControllerClientBlackBerry):
+        (GeolocationControllerClientBlackBerry::requestPermission):
+        (GeolocationControllerClientBlackBerry::cancelPermissionRequest):
+        (GeolocationControllerClientBlackBerry::onLocationUpdate):
+        (GeolocationControllerClientBlackBerry::onLocationError):
+        * blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h:
+        (WebKit):
+        (GeolocationControllerClientBlackBerry):
+
 2012-02-06  Robin Cao  <robin.cao@torchmobile.com.cn>
 
         [BlackBerry] Remove unused variable in BackingStore
index e47bb98..fd59f2e 100644 (file)
 #include "GeolocationController.h"
 #include "GeolocationError.h"
 #include "Page.h"
-#include "WebPage.h"
 #include "WebPage_p.h"
 
 using namespace WebCore;
 
-GeolocationControllerClientBlackBerry::GeolocationControllerClientBlackBerry(BlackBerry::WebKit::WebPage* webPage)
-    : m_webPage(webPage)
+GeolocationControllerClientBlackBerry::GeolocationControllerClientBlackBerry(BlackBerry::WebKit::WebPagePrivate* webPagePrivate)
+    : m_webPagePrivate(webPagePrivate)
     , m_tracker(0)
     , m_accuracy(false)
 {
@@ -67,7 +66,7 @@ void GeolocationControllerClientBlackBerry::requestPermission(Geolocation* locat
     Frame* frame = location->frame();
     if (!frame)
         return;
-    m_webPage->d->m_page->chrome()->requestGeolocationPermissionForFrame(frame, location);
+    m_webPagePrivate->m_page->chrome()->requestGeolocationPermissionForFrame(frame, location);
 }
 
 void GeolocationControllerClientBlackBerry::cancelPermissionRequest(Geolocation* location)
@@ -75,7 +74,7 @@ void GeolocationControllerClientBlackBerry::cancelPermissionRequest(Geolocation*
     Frame* frame = location->frame();
     if (!frame)
         return;
-    m_webPage->d->m_page->chrome()->cancelGeolocationPermissionRequestForFrame(frame, location);
+    m_webPagePrivate->m_page->chrome()->cancelGeolocationPermissionRequestForFrame(frame, location);
 }
 
 void GeolocationControllerClientBlackBerry::onLocationUpdate(double timestamp, double latitude, double longitude, double accuracy, double altitude, bool altitudeValid,
@@ -83,13 +82,13 @@ void GeolocationControllerClientBlackBerry::onLocationUpdate(double timestamp, d
 {
     m_lastPosition = GeolocationPosition::create(timestamp, latitude, longitude, accuracy, altitudeValid, altitude, altitudeAccuracyValid,
                                                  altitudeAccuracy, headingValid, heading, speedValid, speed);
-    m_webPage->d->m_page->geolocationController()->positionChanged(m_lastPosition.get());
+    m_webPagePrivate->m_page->geolocationController()->positionChanged(m_lastPosition.get());
 }
 
 void GeolocationControllerClientBlackBerry::onLocationError(const char* errorStr)
 {
     RefPtr<GeolocationError> error = GeolocationError::create(GeolocationError::PositionUnavailable, String::fromUTF8(errorStr));
-    m_webPage->d->m_page->geolocationController()->errorOccurred(error.get());
+    m_webPagePrivate->m_page->geolocationController()->errorOccurred(error.get());
 }
 
 void GeolocationControllerClientBlackBerry::onPermission(void* context, bool isAllowed)
index 14b095d..ea634bb 100644 (file)
 #ifndef GeolocationControllerClientBlackBerry_h
 #define GeolocationControllerClientBlackBerry_h
 
-#include "WebPage.h"
 #include <BlackBerryPlatformGeoTracker.h>
 #include <BlackBerryPlatformGeoTrackerListener.h>
 #include <GeolocationClient.h>
 #include <GeolocationPosition.h>
 
+namespace BlackBerry {
+namespace WebKit {
+class WebPagePrivate;
+}
+}
+
 namespace WebCore {
 
 class GeolocationControllerClientBlackBerry : public GeolocationClient, public BlackBerry::Platform::GeoTrackerListener {
 public:
-    GeolocationControllerClientBlackBerry(BlackBerry::WebKit::WebPage*);
+    GeolocationControllerClientBlackBerry(BlackBerry::WebKit::WebPagePrivate*);
 
     virtual void geolocationDestroyed();
     virtual void startUpdating();
@@ -46,7 +51,7 @@ public:
     BlackBerry::Platform::GeoTracker* tracker() const { return m_tracker; }
 
 private:
-    BlackBerry::WebKit::WebPage* m_webPage;
+    BlackBerry::WebKit::WebPagePrivate* m_webPagePrivate;
     BlackBerry::Platform::GeoTracker* m_tracker;
     RefPtr<GeolocationPosition> m_lastPosition;
     bool m_accuracy;