Chromium Code Reviews| Index: Source/modules/geolocation/GeolocationController.h |
| diff --git a/Source/modules/geolocation/GeolocationController.h b/Source/modules/geolocation/GeolocationController.h |
| index 118d042a6af54d4f582d8d175395ac7092f1140b..c868ba16d95e6b2f5823a41f9e313a33b3cf426c 100644 |
| --- a/Source/modules/geolocation/GeolocationController.h |
| +++ b/Source/modules/geolocation/GeolocationController.h |
| @@ -42,12 +42,13 @@ class GeolocationError; |
| class GeolocationPosition; |
| class Page; |
| -class GeolocationController FINAL : public Supplement<Page>, public PageLifecycleObserver { |
| +class GeolocationController FINAL : public NoBaseWillBeGarbageCollectedFinalized<GeolocationController>, public WillBeHeapSupplement<Page>, public PageLifecycleObserver { |
| + WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(GeolocationController); |
| WTF_MAKE_NONCOPYABLE(GeolocationController); |
| public: |
| virtual ~GeolocationController(); |
| - static PassOwnPtr<GeolocationController> create(Page&, GeolocationClient*); |
| + static PassOwnPtrWillBeRawPtr<GeolocationController> create(Page&, GeolocationClient*); |
| void addObserver(Geolocation*, bool enableHighAccuracy); |
| void removeObserver(Geolocation*); |
| @@ -68,9 +69,9 @@ public: |
| virtual void pageVisibilityChanged() OVERRIDE; |
| static const char* supplementName(); |
| - static GeolocationController* from(Page* page) { return static_cast<GeolocationController*>(Supplement<Page>::from(page, supplementName())); } |
| + static GeolocationController* from(Page* page) { return static_cast<GeolocationController*>(WillBeHeapSupplement<Page>::from(page, supplementName())); } |
| - virtual void trace(Visitor*) OVERRIDE { }; |
| + virtual void trace(Visitor*) OVERRIDE; |
| virtual void willBeDestroyed() OVERRIDE; |
| @@ -83,8 +84,8 @@ private: |
| GeolocationClient* m_client; |
|
haraken
2014/04/30 02:41:22
Ditto. I wonder how it's guaranteed that the clien
zerny-chromium
2014/04/30 08:29:34
The opposite needs to hold. The client should alwa
haraken
2014/04/30 11:18:08
This raw pointer happens to be safe because WebVie
haraken
2014/04/30 11:19:58
Note: I haven't yet checked if other m_client poin
zerny-chromium
2014/04/30 11:46:53
Page is already moved. This CL does not change its
haraken
2014/04/30 12:02:08
Sorry, I was misunderstanding! The supplementable
|
| bool m_hasClientForTest; |
| - RefPtrWillBePersistent<GeolocationPosition> m_lastPosition; |
| - typedef WillBePersistentHeapHashSet<RefPtrWillBeMember<Geolocation> > ObserversSet; |
| + RefPtrWillBeMember<GeolocationPosition> m_lastPosition; |
| + typedef WillBeHeapHashSet<RefPtrWillBeMember<Geolocation> > ObserversSet; |
| // All observers; both those requesting high accuracy and those not. |
| ObserversSet m_observers; |
| ObserversSet m_highAccuracyObservers; |