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

Unified Diff: Source/modules/geofencing/Geofencing.h

Issue 623813002: Blink side of exposing the service worker registration associated with geofencing API calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: remove NavigatorGeofencing Created 6 years, 2 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: Source/modules/geofencing/Geofencing.h
diff --git a/Source/modules/geofencing/Geofencing.h b/Source/modules/geofencing/Geofencing.h
index 6624dac90592d5775d79ec4a80c46a9bb745cedb..8de90e76b95c6f27f9b5a69adb66bb73707d976e 100644
--- a/Source/modules/geofencing/Geofencing.h
+++ b/Source/modules/geofencing/Geofencing.h
@@ -15,23 +15,26 @@ class ExecutionContext;
class GeofencingRegion;
class ScriptPromise;
class ScriptState;
+class ServiceWorkerRegistration;
class Geofencing final : public GarbageCollected<Geofencing>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static Geofencing* create()
+ static Geofencing* create(ServiceWorkerRegistration* registration)
{
- return new Geofencing();
+ return new Geofencing(registration);
}
ScriptPromise registerRegion(ScriptState*, GeofencingRegion*);
ScriptPromise unregisterRegion(ScriptState*, const String& regionId);
ScriptPromise getRegisteredRegions(ScriptState*) const;
- virtual void trace(Visitor*) { }
+ virtual void trace(Visitor*);
private:
- Geofencing();
+ explicit Geofencing(ServiceWorkerRegistration*);
+
+ Member<ServiceWorkerRegistration> m_registration;
michaeln 2014/10/14 01:16:15 leap of faith on the smart gc'able reference cycl
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698