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

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 OWNERS for platform/modules/background_sync 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
Index: Source/modules/background_sync/SyncManager.h
diff --git a/Source/modules/geofencing/Geofencing.h b/Source/modules/background_sync/SyncManager.h
similarity index 36%
copy from Source/modules/geofencing/Geofencing.h
copy to Source/modules/background_sync/SyncManager.h
index 87e0622320b9aeb442444eb5cd3569fb5e7c7f18..ffbda8d81fb67c17fa7dfa5272b11ac915cc93dc 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,37 @@
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>
jochen (gone - plz use gerrit) 2015/03/13 14:39:03 plz use blink style (all derived classes in one li
iclelland 2015/03/16 13:09:40 Done.
+ , 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

Powered by Google App Engine
This is Rietveld 408576698