chromium/third_party/blink/renderer/modules/nfc/nfc_proxy.cc

// Copyright 2019 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/nfc/nfc_proxy.h"

#include <utility>

#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/modules/nfc/ndef_reader.h"
#include "third_party/blink/renderer/modules/nfc/nfc_type_converters.h"

namespace blink {

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

// static
NFCProxy* NFCProxy::From(LocalDOMWindow& window) {}

// NFCProxy
NFCProxy::NFCProxy(LocalDOMWindow& window)
    :{}

NFCProxy::~NFCProxy() = default;

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

void NFCProxy::StartReading(NDEFReader* reader,
                            device::mojom::blink::NFC::WatchCallback callback) {}

void NFCProxy::StopReading(NDEFReader* reader) {}

bool NFCProxy::IsReading(const NDEFReader* reader) {}

void NFCProxy::AddWriter(NDEFReader* writer) {}

void NFCProxy::Push(device::mojom::blink::NDEFMessagePtr message,
                    device::mojom::blink::NDEFWriteOptionsPtr options,
                    device::mojom::blink::NFC::PushCallback cb) {}

void NFCProxy::CancelPush() {}

void NFCProxy::MakeReadOnly(
    device::mojom::blink::NFC::MakeReadOnlyCallback cb) {}

void NFCProxy::CancelMakeReadOnly() {}

// device::mojom::blink::NFCClient implementation.
void NFCProxy::OnWatch(const Vector<uint32_t>& watch_ids,
                       const String& serial_number,
                       device::mojom::blink::NDEFMessagePtr message) {}

void NFCProxy::OnError(device::mojom::blink::NDEFErrorPtr error) {}

void NFCProxy::OnReaderRegistered(
    NDEFReader* reader,
    uint32_t watch_id,
    device::mojom::blink::NFC::WatchCallback callback,
    device::mojom::blink::NDEFErrorPtr error) {}

void NFCProxy::EnsureMojoConnection() {}

// This method will be called if either the NFC service is unavailable (such
// as if the feature flag is disabled) or when the user revokes the NFC
// permission after the Mojo connection has already been opened. It is
// currently impossible to distinguish between these two cases.
//
// In the future this code may also handle the case where an out-of-process
// Device Service encounters a fatal error and must be restarted.
void NFCProxy::OnMojoConnectionError() {}

}  // namespace blink