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

Unified Diff: Source/modules/background_sync/SyncManager.h

Issue 963683002: Add IDL and initial Blink API for Background Sync (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add missing serviceWorkerRegistration.syncManager to interface tests Created 5 years, 9 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
« no previous file with comments | « Source/modules/background_sync/SyncEventInit.idl ('k') | Source/modules/background_sync/SyncManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/modules/background_sync/SyncManager.h
diff --git a/Source/modules/geofencing/Geofencing.h b/Source/modules/background_sync/SyncManager.h
similarity index 37%
copy from Source/modules/geofencing/Geofencing.h
copy to Source/modules/background_sync/SyncManager.h
index 87e0622320b9aeb442444eb5cd3569fb5e7c7f18..6eca1a04fe2399c7708e5082be801bcb5e660859 100644
--- a/Source/modules/geofencing/Geofencing.h
+++ b/Source/modules/background_sync/SyncManager.h
@@ -1,9 +1,9 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
+// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef Geofencing_h
-#define Geofencing_h
+#ifndef SyncManager_h
+#define SyncManager_h
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/heap/Handle.h"
@@ -11,31 +11,35 @@
namespace blink {
-class GeofencingRegion;
+class SyncRegistrationOptions;
class ScriptPromise;
class ScriptState;
class ServiceWorkerRegistration;
-class Geofencing final : public GarbageCollected<Geofencing>, public ScriptWrappable {
+class SyncManager final : public GarbageCollectedFinalized<SyncManager> , public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
- static Geofencing* create(ServiceWorkerRegistration* registration)
+ static SyncManager* create(ServiceWorkerRegistration* registration)
{
- return new Geofencing(registration);
+ return new SyncManager(registration);
}
+ ~SyncManager() { }
- ScriptPromise registerRegion(ScriptState*, GeofencingRegion*);
- ScriptPromise unregisterRegion(ScriptState*, const String& regionId);
- ScriptPromise getRegisteredRegions(ScriptState*) const;
+ unsigned long minAllowablePeriod();
- DECLARE_VIRTUAL_TRACE();
+ ScriptPromise registerFunction(ScriptState*);
+ ScriptPromise registerFunction(ScriptState*, const SyncRegistrationOptions&);
+ ScriptPromise getRegistration(blink::ScriptState*, const String&);
+ ScriptPromise getRegistrations(ScriptState*);
+
+ DECLARE_TRACE();
private:
- explicit Geofencing(ServiceWorkerRegistration*);
+ explicit SyncManager(ServiceWorkerRegistration*);
Member<ServiceWorkerRegistration> m_registration;
};
} // namespace blink
-#endif // Geofencing_h
+#endif // SyncManager_h
« no previous file with comments | « Source/modules/background_sync/SyncEventInit.idl ('k') | Source/modules/background_sync/SyncManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698