chromium/third_party/blink/renderer/modules/font_access/font_access.cc

// Copyright 2020 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/font_access/font_access.h"

#include <algorithm>

#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/numerics/safe_conversions.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/font_access/font_enumeration_table.pb.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom-blink.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/platform.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/bindings/modules/v8/v8_query_options.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.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/modules/font_access/font_metadata.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"

namespace blink {

FontEnumerationStatus;

namespace {

const char kFeaturePolicyBlocked[] =;
}

// static
const char FontAccess::kSupplementName[] =;

FontAccess::FontAccess(LocalDOMWindow* window)
    :{}

void FontAccess::Trace(blink::Visitor* visitor) const {}

// static
ScriptPromise<IDLSequence<FontMetadata>> FontAccess::queryLocalFonts(
    ScriptState* script_state,
    LocalDOMWindow& window,
    const QueryOptions* options,
    ExceptionState& exception_state) {}

// static
FontAccess* FontAccess::From(LocalDOMWindow* window) {}

ScriptPromise<IDLSequence<FontMetadata>> FontAccess::QueryLocalFontsImpl(
    ScriptState* script_state,
    const QueryOptions* options,
    ExceptionState& exception_state) {}

void FontAccess::DidGetEnumerationResponse(
    const QueryOptions* options,
    ScriptPromiseResolver<IDLSequence<FontMetadata>>* resolver,
    FontEnumerationStatus status,
    base::ReadOnlySharedMemoryRegion region) {}

bool FontAccess::RejectPromiseIfNecessary(const FontEnumerationStatus& status,
                                          ScriptPromiseResolverBase* resolver) {}

void FontAccess::OnDisconnect() {}

}  // namespace blink