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

Unified Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h

Issue 2745243002: Implement a Mojo service for Background Fetch (Closed)
Patch Set: Implement a Mojo service for Background Fetch Created 3 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: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h
index e52725ed443ed924cf168d1a99fd14afabfb322e..a59dd784e4e961ad1191fe4de01bf9c24f69995d 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchManager.h
@@ -9,11 +9,15 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "platform/heap/GarbageCollected.h"
#include "platform/heap/Handle.h"
+#include "public/platform/modules/background_fetch/background_fetch.mojom-blink.h"
namespace blink {
+class BackgroundFetchBridge;
class BackgroundFetchOptions;
+class BackgroundFetchRegistration;
class RequestOrUSVString;
+class ScriptPromiseResolver;
class ScriptState;
class ServiceWorkerRegistration;
@@ -32,10 +36,10 @@ class BackgroundFetchManager final
// Web Exposed methods defined in the IDL file.
ScriptPromise fetch(ScriptState*,
- String tag,
+ const String& tag,
HeapVector<RequestOrUSVString> requests,
const BackgroundFetchOptions&);
- ScriptPromise get(ScriptState*, String tag);
+ ScriptPromise get(ScriptState*, const String& tag);
ScriptPromise getTags(ScriptState*);
DECLARE_TRACE();
@@ -43,7 +47,15 @@ class BackgroundFetchManager final
private:
explicit BackgroundFetchManager(ServiceWorkerRegistration*);
+ void didGetRegistration(ScriptPromiseResolver*,
+ mojom::blink::BackgroundFetchError,
+ BackgroundFetchRegistration*);
+ void didGetTags(ScriptPromiseResolver*,
+ mojom::blink::BackgroundFetchError,
+ const Vector<String>& tags);
+
Member<ServiceWorkerRegistration> m_registration;
+ Member<BackgroundFetchBridge> m_bridge;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698