summaryrefslogtreecommitdiffstats
path: root/dom/fetch/FetchObserver.h
diff options
context:
space:
mode:
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;