Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: third_party/WebKit/Source/web/WebGeolocationController.cpp

Issue 1919153002: Tidy up WebGeolocationController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: still support implicit conversion Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/web/WebGeolocationController.cpp
diff --git a/third_party/WebKit/Source/web/WebGeolocationController.cpp b/third_party/WebKit/Source/web/WebGeolocationController.cpp
index aee5c3ebd074e8a61a0c874853017f2ff0cd7182..2df51040b00b5c5588c7508123db820a78c7ee65 100644
--- a/third_party/WebKit/Source/web/WebGeolocationController.cpp
+++ b/third_party/WebKit/Source/web/WebGeolocationController.cpp
@@ -35,41 +35,8 @@
namespace blink {
-// TODO(Oilpan): once GeolocationController is always on the heap,
-// shorten out this GeolocationControllerPrivate intermediary.
-class GeolocationControllerPrivate final : public GarbageCollected<GeolocationControllerPrivate> {
-public:
- static GeolocationControllerPrivate* create(GeolocationController* controller)
- {
- return new GeolocationControllerPrivate(controller);
- }
-
- static GeolocationController& controller(const WebPrivatePtr<GeolocationControllerPrivate>& controller)
- {
- DCHECK(!controller.isNull());
- DCHECK(controller->m_controller);
- return *controller->m_controller;
- }
-
- DEFINE_INLINE_TRACE()
- {
- visitor->trace(m_controller);
- }
-
-private:
- explicit GeolocationControllerPrivate(GeolocationController* controller)
- : m_controller(controller)
- {
- }
-
- // Non-Oilpan, this bare pointer is owned as a supplement and kept alive
- // by the frame of the WebLocalFrame which creates the WebGeolocationController
- // object that wraps it all up.
- Member<GeolocationController> m_controller;
-};
-
WebGeolocationController::WebGeolocationController(GeolocationController* controller)
- : m_private(GeolocationControllerPrivate::create(controller))
+ : m_private(controller)
{
}
@@ -80,12 +47,12 @@ void WebGeolocationController::reset()
void WebGeolocationController::positionChanged(const WebGeolocationPosition& webPosition)
{
- GeolocationControllerPrivate::controller(m_private).positionChanged(static_cast<GeolocationPosition*>(webPosition));
+ m_private->positionChanged(static_cast<GeolocationPosition*>(webPosition));
}
void WebGeolocationController::errorOccurred(const WebGeolocationError& webError)
{
- GeolocationControllerPrivate::controller(m_private).errorOccurred(static_cast<GeolocationError*>(webError));
+ m_private->errorOccurred(static_cast<GeolocationError*>(webError));
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/GeolocationClientProxy.cpp ('k') | third_party/WebKit/public/web/WebGeolocationController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698