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
+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
#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)
{
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)
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,
{
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)
#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();
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;