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

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

Issue 2745243002: Implement a Mojo service for Background Fetch (Closed)
Patch Set: rebase + comments v2 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 cb30771dee074aa37387d5cbc7cfb1c449700cf4..03cd38f8b17468bda11bd144d15c9edaa4e8cfb5 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 RequestOrUSVStringOrRequestOrUSVStringSequence;
+class ScriptPromiseResolver;
class ScriptState;
class ServiceWorkerRegistration;
@@ -33,10 +37,10 @@ class BackgroundFetchManager final
// Web Exposed methods defined in the IDL file.
ScriptPromise fetch(
ScriptState*,
- String tag,
+ const String& tag,
const RequestOrUSVStringOrRequestOrUSVStringSequence& requests,
const BackgroundFetchOptions&);
- ScriptPromise get(ScriptState*, String tag);
+ ScriptPromise get(ScriptState*, const String& tag);
ScriptPromise getTags(ScriptState*);
DECLARE_TRACE();
@@ -44,7 +48,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