chromium/third_party/blink/renderer/modules/service_worker/wait_until_observer.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/modules/service_worker/wait_until_observer.h"

#include "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom-blink.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/core/execution_context/agent.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/service_worker/service_worker_global_scope.h"
#include "third_party/blink/renderer/platform/scheduler/public/event_loop.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread.h"
#include "third_party/blink/renderer/platform/web_test_support.h"
#include "v8/include/v8.h"

namespace blink {

namespace {

// Timeout before a service worker that was given window interaction
// permission loses them. The unit is seconds.
const unsigned kWindowInteractionTimeout =;
const unsigned kWindowInteractionTimeoutForTest =;

base::TimeDelta WindowInteractionTimeout() {}

}  // anonymous namespace

class WaitUntilObserver::ThenFunction final : public ScriptFunction::Callable {};

void WaitUntilObserver::WillDispatchEvent() {}

void WaitUntilObserver::DidDispatchEvent(bool event_dispatch_failed) {}

// https://w3c.github.io/ServiceWorker/#dom-extendableevent-waituntil
bool WaitUntilObserver::WaitUntil(ScriptState* script_state,
                                  ScriptPromiseUntyped script_promise,
                                  ExceptionState& exception_state,
                                  PromiseSettledCallback on_promise_fulfilled,
                                  PromiseSettledCallback on_promise_rejected) {}

// https://w3c.github.io/ServiceWorker/#extendableevent-active
bool WaitUntilObserver::IsEventActive() const {}

bool WaitUntilObserver::IsDispatchingEvent() const {}

WaitUntilObserver::WaitUntilObserver(ExecutionContext* context,
                                     EventType type,
                                     int event_id)
    :{}

void WaitUntilObserver::OnPromiseFulfilled() {}

void WaitUntilObserver::OnPromiseRejected() {}

void WaitUntilObserver::IncrementPendingPromiseCount() {}

void WaitUntilObserver::DecrementPendingPromiseCount() {}

void WaitUntilObserver::MaybeCompleteEvent() {}

void WaitUntilObserver::ConsumeWindowInteraction(TimerBase*) {}

void WaitUntilObserver::Trace(Visitor* visitor) const {}

}  // namespace blink