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

Unified Diff: third_party/WebKit/public/web/WebGeolocationController.h

Issue 1444333002: WebGeolocationController: improve handling of bare GeolocationController* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « third_party/WebKit/Source/web/WebGeolocationController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WebGeolocationController.h
diff --git a/third_party/WebKit/public/web/WebGeolocationController.h b/third_party/WebKit/public/web/WebGeolocationController.h
index 13e375727db9e7a5b56df0aa42f38761eae85cbc..36fb3691901fb165aa3d4cbbdb5d9d5f80a132a4 100644
--- a/third_party/WebKit/public/web/WebGeolocationController.h
+++ b/third_party/WebKit/public/web/WebGeolocationController.h
@@ -28,25 +28,24 @@
#include "../platform/WebCommon.h"
#include "../platform/WebNonCopyable.h"
+#include "../platform/WebPrivatePtr.h"
namespace blink {
class GeolocationController;
+class GeolocationControllerPrivate;
class WebGeolocationPosition;
class WebGeolocationError;
class WebGeolocationController : public WebNonCopyable {
public:
+ ~WebGeolocationController() { reset(); }
+
BLINK_EXPORT void positionChanged(const WebGeolocationPosition&);
BLINK_EXPORT void errorOccurred(const WebGeolocationError&);
#if BLINK_IMPLEMENTATION
- WebGeolocationController(GeolocationController* c)
- : m_private(c)
- {
- }
-
- GeolocationController* controller() const { return m_private; }
+ WebGeolocationController(GeolocationController*);
#endif
private:
@@ -54,9 +53,9 @@ private:
// can be created by the consumers of Chromium WebKit.
WebGeolocationController();
- // This bare pointer is owned and kept alive by the frame of the
- // WebLocalFrame which creates this controller object.
- GeolocationController* m_private;
+ BLINK_EXPORT void reset();
+
+ WebPrivatePtr<GeolocationControllerPrivate> m_private;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/WebGeolocationController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698