summaryrefslogtreecommitdiffstats
path: root/dom/fetch/FetchObserver.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-06-11 08:51:07 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-06-13 11:52:04 +0200
commitbb7060582934f087b71702d1e83f762d5fd6f0af (patch)
treef61da2175542328c6a5e7a69280874dd1298f9b6 /dom/fetch/FetchObserver.h
parent3f3d626434b2533182ca0ee90adc92a1e7db373c (diff)
downloadUXP-bb7060582934f087b71702d1e83f762d5fd6f0af.tar
UXP-bb7060582934f087b71702d1e83f762d5fd6f0af.tar.gz
UXP-bb7060582934f087b71702d1e83f762d5fd6f0af.tar.lz
UXP-bb7060582934f087b71702d1e83f762d5fd6f0af.tar.xz
UXP-bb7060582934f087b71702d1e83f762d5fd6f0af.zip
Issue #1587 - Part 5: Hook FetchObserver up to the Fetch API
Diffstat (limited to 'dom/fetch/FetchObserver.h')
-rw-r--r--dom/fetch/FetchObserver.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/dom/fetch/FetchObserver.h b/dom/fetch/FetchObserver.h
index 81f8e7b09..45adf2ba1 100644
--- a/dom/fetch/FetchObserver.h
+++ b/dom/fetch/FetchObserver.h
@@ -9,11 +9,13 @@
#include "mozilla/DOMEventTargetHelper.h"
#include "mozilla/dom/FetchObserverBinding.h"
+#include "mozilla/dom/FetchSignal.h"
namespace mozilla {
namespace dom {
class FetchObserver final : public DOMEventTargetHelper
+ , public FetchSignal::Follower
{
public:
NS_DECL_ISUPPORTS_INHERITED
@@ -22,7 +24,7 @@ public:
static bool
IsEnabled(JSContext* aCx, JSObject* aGlobal);
- FetchObserver(nsIGlobalObject* aGlobal, FetchState aState);
+ FetchObserver(nsIGlobalObject* aGlobal, FetchSignal* aSignal);
JSObject*
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
@@ -34,6 +36,12 @@ public:
IMPL_EVENT_HANDLER(requestprogress);
IMPL_EVENT_HANDLER(responseprogress);
+ void
+ Aborted() override;
+
+ void
+ SetState(FetchState aState);
+
private:
~FetchObserver() = default;