#include "third_party/blink/renderer/modules/keyboard/keyboard_layout.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token_builder.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.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/execution_context/execution_context.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/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/privacy_budget/identifiability_digest_helpers.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"
namespace blink {
namespace {
constexpr char kKeyboardMapFrameDetachedErrorMsg[] = …;
constexpr char kFeaturePolicyBlocked[] = …;
constexpr char kKeyboardMapRequestFailedErrorMsg[] = …;
constexpr IdentifiableSurface kGetKeyboardLayoutMapSurface = …;
IdentifiableToken ComputeLayoutValue(
const WTF::HashMap<WTF::String, WTF::String>& layout_map) { … }
void RecordGetLayoutMapResult(ExecutionContext* context,
IdentifiableToken value) { … }
}
KeyboardLayout::KeyboardLayout(ExecutionContext* context)
: … { … }
ScriptPromise<KeyboardLayoutMap> KeyboardLayout::GetKeyboardLayoutMap(
ScriptState* script_state,
ExceptionState& exception_state) { … }
bool KeyboardLayout::IsLocalFrameAttached() { … }
bool KeyboardLayout::EnsureServiceConnected() { … }
void KeyboardLayout::GotKeyboardLayoutMap(
ScriptPromiseResolver<KeyboardLayoutMap>* resolver,
mojom::blink::GetKeyboardLayoutMapResultPtr result) { … }
void KeyboardLayout::Trace(Visitor* visitor) const { … }
}