#include "third_party/blink/renderer/modules/locks/lock.h"
#include "base/task/single_thread_task_runner.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_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/locks/lock_manager.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
namespace blink {
namespace {
const char* kLockModeNameExclusive = …;
const char* kLockModeNameShared = …;
}
class Lock::ThenFunction final : public ScriptFunction::Callable { … };
Lock::Lock(ScriptState* script_state,
const String& name,
mojom::blink::LockMode mode,
mojo::PendingAssociatedRemote<mojom::blink::LockHandle> handle,
mojo::PendingRemote<mojom::blink::ObservedFeature> lock_lifetime,
LockManager* manager)
: … { … }
Lock::~Lock() = default;
String Lock::mode() const { … }
void Lock::HoldUntil(ScriptPromise<IDLAny> promise,
ScriptPromiseResolver<IDLAny>* resolver) { … }
mojom::blink::LockMode Lock::StringToMode(const String& string) { … }
String Lock::ModeToString(mojom::blink::LockMode mode) { … }
void Lock::ContextDestroyed() { … }
void Lock::Trace(Visitor* visitor) const { … }
void Lock::ReleaseIfHeld() { … }
void Lock::OnConnectionError() { … }
}