Modified: trunk/Source/WebKit/ChangeLog (106902 => 106903)
--- trunk/Source/WebKit/ChangeLog 2012-02-07 04:47:15 UTC (rev 106902)
+++ trunk/Source/WebKit/ChangeLog 2012-02-07 05:09:11 UTC (rev 106903)
@@ -1,3 +1,26 @@
+2012-02-06 Leo Yang <leo.y...@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....@torchmobile.com.cn>
[BlackBerry] Remove unused variable in BackingStore
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp (106902 => 106903)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp 2012-02-07 04:47:15 UTC (rev 106902)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.cpp 2012-02-07 05:09:11 UTC (rev 106903)
@@ -24,13 +24,12 @@
#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 @@
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 @@
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 @@
{
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)
Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h (106902 => 106903)
--- trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h 2012-02-07 04:47:15 UTC (rev 106902)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/GeolocationControllerClientBlackBerry.h 2012-02-07 05:09:11 UTC (rev 106903)
@@ -19,17 +19,22 @@
#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 @@
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;