| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 #ifndef GeolocationController_h | 26 #ifndef GeolocationController_h |
| 27 #define GeolocationController_h | 27 #define GeolocationController_h |
| 28 | 28 |
| 29 #include "core/frame/LocalFrame.h" | 29 #include "core/frame/LocalFrame.h" |
| 30 #include "core/page/PageLifecycleObserver.h" | 30 #include "core/page/PageLifecycleObserver.h" |
| 31 #include "modules/geolocation/Geolocation.h" | 31 #include "modules/geolocation/Geolocation.h" |
| 32 #include "platform/heap/Handle.h" | 32 #include "platform/heap/Handle.h" |
| 33 #include "wtf/HashSet.h" | 33 #include "wtf/HashSet.h" |
| 34 #include "wtf/Noncopyable.h" | 34 #include "wtf/Noncopyable.h" |
| 35 #include "wtf/RefPtr.h" | |
| 36 | 35 |
| 37 namespace WebCore { | 36 namespace WebCore { |
| 38 | 37 |
| 39 class GeolocationInspectorAgent; | 38 class GeolocationInspectorAgent; |
| 40 class GeolocationClient; | 39 class GeolocationClient; |
| 41 class GeolocationError; | 40 class GeolocationError; |
| 42 class GeolocationPosition; | 41 class GeolocationPosition; |
| 43 | 42 |
| 44 class GeolocationController FINAL : public Supplement<LocalFrame>, public PageLi
fecycleObserver { | 43 class GeolocationController FINAL : public Supplement<LocalFrame>, public PageLi
fecycleObserver { |
| 45 WTF_MAKE_NONCOPYABLE(GeolocationController); | 44 WTF_MAKE_NONCOPYABLE(GeolocationController); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 73 | 72 |
| 74 private: | 73 private: |
| 75 GeolocationController(LocalFrame&, GeolocationClient*); | 74 GeolocationController(LocalFrame&, GeolocationClient*); |
| 76 | 75 |
| 77 void startUpdatingIfNeeded(); | 76 void startUpdatingIfNeeded(); |
| 78 void stopUpdatingIfNeeded(); | 77 void stopUpdatingIfNeeded(); |
| 79 | 78 |
| 80 GeolocationClient* m_client; | 79 GeolocationClient* m_client; |
| 81 bool m_hasClientForTest; | 80 bool m_hasClientForTest; |
| 82 | 81 |
| 83 RefPtrWillBePersistent<GeolocationPosition> m_lastPosition; | 82 Persistent<GeolocationPosition> m_lastPosition; |
| 84 typedef WillBePersistentHeapHashSet<RefPtrWillBeMember<Geolocation> > Observ
ersSet; | 83 typedef PersistentHeapHashSet<Member<Geolocation> > ObserversSet; |
| 85 // All observers; both those requesting high accuracy and those not. | 84 // All observers; both those requesting high accuracy and those not. |
| 86 ObserversSet m_observers; | 85 ObserversSet m_observers; |
| 87 ObserversSet m_highAccuracyObservers; | 86 ObserversSet m_highAccuracyObservers; |
| 88 bool m_isClientUpdating; | 87 bool m_isClientUpdating; |
| 89 GeolocationInspectorAgent* m_inspectorAgent; | 88 GeolocationInspectorAgent* m_inspectorAgent; |
| 90 }; | 89 }; |
| 91 | 90 |
| 92 } // namespace WebCore | 91 } // namespace WebCore |
| 93 | 92 |
| 94 #endif // GeolocationController_h | 93 #endif // GeolocationController_h |
| OLD | NEW |