#include "third_party/blink/renderer/modules/keyboard/keyboard_lock.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.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_throw_dom_exception.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/v8_binding.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
namespace blink {
namespace {
constexpr char kKeyboardLockFrameDetachedErrorMsg[] = …;
constexpr char kKeyboardLockPromisePreemptedErrorMsg[] = …;
constexpr char kKeyboardLockNoValidKeyCodesErrorMsg[] = …;
constexpr char kKeyboardLockChildFrameErrorMsg[] = …;
constexpr char kKeyboardLockRequestFailedErrorMsg[] = …;
}
KeyboardLock::KeyboardLock(ExecutionContext* context)
: … { … }
KeyboardLock::~KeyboardLock() = default;
ScriptPromise<IDLUndefined> KeyboardLock::lock(
ScriptState* state,
const Vector<String>& keycodes,
ExceptionState& exception_state) { … }
void KeyboardLock::unlock(ScriptState* state) { … }
bool KeyboardLock::IsLocalFrameAttached() { … }
bool KeyboardLock::EnsureServiceConnected() { … }
bool KeyboardLock::CalledFromSupportedContext(ExecutionContext* context) { … }
void KeyboardLock::LockRequestFinished(
ScriptPromiseResolver<IDLUndefined>* resolver,
mojom::KeyboardLockRequestResult result) { … }
void KeyboardLock::Trace(Visitor* visitor) const { … }
}