chromium/content/browser/service_worker/service_worker_usb_delegate_observer.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/service_worker/service_worker_usb_delegate_observer.h"

#include <cstdint>

#include "base/functional/bind.h"
#include "base/memory/weak_ptr.h"
#include "content/browser/service_worker/service_worker_context_core.h"
#include "content/browser/service_worker/service_worker_context_wrapper.h"
#include "content/browser/service_worker/service_worker_registration.h"
#include "content/browser/service_worker/service_worker_version.h"
#include "content/browser/usb/web_usb_service_impl.h"
#include "content/public/common/content_client.h"
#include "services/device/public/mojom/usb_device.mojom.h"
#include "third_party/blink/public/common/service_worker/embedded_worker_status.h"

namespace content {

namespace {

bool HasDevicePermission(UsbDelegate* delegate,
                         BrowserContext* browser_context,
                         const blink::StorageKey& key,
                         const device::mojom::UsbDeviceInfo& device_info) {}

}  // namespace

ServiceWorkerUsbDelegateObserver::ServiceWorkerUsbDelegateObserver(
    ServiceWorkerContextCore* context)
    :{}

ServiceWorkerUsbDelegateObserver::~ServiceWorkerUsbDelegateObserver() = default;

void ServiceWorkerUsbDelegateObserver::OnDeviceAdded(
    const device::mojom::UsbDeviceInfo& device_info) {}

void ServiceWorkerUsbDelegateObserver::OnDeviceRemoved(
    const device::mojom::UsbDeviceInfo& device_info) {}

void ServiceWorkerUsbDelegateObserver::OnDeviceManagerConnectionError() {}

void ServiceWorkerUsbDelegateObserver::OnPermissionRevoked(
    const url::Origin& origin) {}

void ServiceWorkerUsbDelegateObserver::RegisterUsbService(
    int64_t registration_id,
    base::WeakPtr<WebUsbServiceImpl> usb_service) {}

void ServiceWorkerUsbDelegateObserver::RegistrationAdded(
    int64_t registration_id) {}

void ServiceWorkerUsbDelegateObserver::RegistrationRemoved(
    int64_t registration_id) {}

void ServiceWorkerUsbDelegateObserver::DispatchUsbDeviceEventToWorkers(
    const device::mojom::UsbDeviceInfo& device_info,
    UsbServiceDeviceEventCallback callback) {}

void ServiceWorkerUsbDelegateObserver::WorkerStarted(
    device::mojom::UsbDeviceInfoPtr device_info,
    UsbServiceDeviceEventCallback callback,
    scoped_refptr<ServiceWorkerVersion> version,
    blink::ServiceWorkerStatusCode service_worker_status) {}

WebUsbServiceImpl* ServiceWorkerUsbDelegateObserver::GetUsbService(
    int64_t registration_id) {}

}  // namespace content