chromium/extensions/browser/api/sockets_udp/sockets_udp_api.cc

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

#include "extensions/browser/api/sockets_udp/sockets_udp_api.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/types/optional_util.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/socket_permission_request.h"
#include "extensions/browser/api/socket/udp_socket.h"
#include "extensions/browser/api/sockets_udp/udp_socket_event_dispatcher.h"
#include "extensions/common/api/sockets/sockets_manifest_data.h"
#include "net/base/net_errors.h"
#include "services/network/public/mojom/network_context.mojom.h"

namespace extensions {
namespace api {

SocketPermissionRequest;

const char kSocketNotFoundError[] =;
const char kPermissionError[] =;
const char kWildcardAddress[] =;
const int kWildcardPort =;

UDPSocketApiFunction::~UDPSocketApiFunction() = default;

std::unique_ptr<SocketResourceManagerInterface>
UDPSocketApiFunction::CreateSocketResourceManager() {}

ResumableUDPSocket* UDPSocketApiFunction::GetUdpSocket(int socket_id) {}

UDPSocketExtensionWithDnsLookupFunction::
    ~UDPSocketExtensionWithDnsLookupFunction() = default;

std::unique_ptr<SocketResourceManagerInterface>
UDPSocketExtensionWithDnsLookupFunction::CreateSocketResourceManager() {}

ResumableUDPSocket* UDPSocketExtensionWithDnsLookupFunction::GetUdpSocket(
    int socket_id) {}

sockets_udp::SocketInfo CreateSocketInfo(int socket_id,
                                         ResumableUDPSocket* socket) {}

void SetSocketProperties(ResumableUDPSocket* socket,
                         sockets_udp::SocketProperties* properties) {}

SocketsUdpCreateFunction::SocketsUdpCreateFunction() = default;

SocketsUdpCreateFunction::~SocketsUdpCreateFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpCreateFunction::Work() {}

SocketsUdpUpdateFunction::SocketsUdpUpdateFunction() = default;

SocketsUdpUpdateFunction::~SocketsUdpUpdateFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpUpdateFunction::Work() {}

SocketsUdpSetPausedFunction::SocketsUdpSetPausedFunction() = default;

SocketsUdpSetPausedFunction::~SocketsUdpSetPausedFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpSetPausedFunction::Work() {}

SocketsUdpBindFunction::SocketsUdpBindFunction() = default;

SocketsUdpBindFunction::~SocketsUdpBindFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpBindFunction::Work() {}

void SocketsUdpBindFunction::OnCompleted(int net_result) {}

SocketsUdpSendFunction::SocketsUdpSendFunction() = default;

SocketsUdpSendFunction::~SocketsUdpSendFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpSendFunction::Work() {}

void SocketsUdpSendFunction::AfterDnsLookup(int lookup_result) {}

void SocketsUdpSendFunction::StartSendTo() {}

void SocketsUdpSendFunction::OnCompleted(int net_result) {}

void SocketsUdpSendFunction::SetSendResult(int net_result, int bytes_sent) {}

SocketsUdpCloseFunction::SocketsUdpCloseFunction() = default;

SocketsUdpCloseFunction::~SocketsUdpCloseFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpCloseFunction::Work() {}

SocketsUdpGetInfoFunction::SocketsUdpGetInfoFunction() = default;

SocketsUdpGetInfoFunction::~SocketsUdpGetInfoFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpGetInfoFunction::Work() {}

SocketsUdpGetSocketsFunction::SocketsUdpGetSocketsFunction() = default;

SocketsUdpGetSocketsFunction::~SocketsUdpGetSocketsFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpGetSocketsFunction::Work() {}

SocketsUdpJoinGroupFunction::SocketsUdpJoinGroupFunction() = default;

SocketsUdpJoinGroupFunction::~SocketsUdpJoinGroupFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpJoinGroupFunction::Work() {}

void SocketsUdpJoinGroupFunction::OnCompleted(int net_result) {}

SocketsUdpLeaveGroupFunction::SocketsUdpLeaveGroupFunction() = default;

SocketsUdpLeaveGroupFunction::~SocketsUdpLeaveGroupFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpLeaveGroupFunction::Work() {}

void SocketsUdpLeaveGroupFunction::OnCompleted(int result) {}

SocketsUdpSetMulticastTimeToLiveFunction::
    SocketsUdpSetMulticastTimeToLiveFunction() = default;

SocketsUdpSetMulticastTimeToLiveFunction::
    ~SocketsUdpSetMulticastTimeToLiveFunction() = default;

ExtensionFunction::ResponseAction
SocketsUdpSetMulticastTimeToLiveFunction::Work() {}

SocketsUdpSetMulticastLoopbackModeFunction::
    SocketsUdpSetMulticastLoopbackModeFunction() = default;

SocketsUdpSetMulticastLoopbackModeFunction::
    ~SocketsUdpSetMulticastLoopbackModeFunction() = default;

ExtensionFunction::ResponseAction
SocketsUdpSetMulticastLoopbackModeFunction::Work() {}

SocketsUdpGetJoinedGroupsFunction::SocketsUdpGetJoinedGroupsFunction() =
    default;

SocketsUdpGetJoinedGroupsFunction::~SocketsUdpGetJoinedGroupsFunction() =
    default;

ExtensionFunction::ResponseAction SocketsUdpGetJoinedGroupsFunction::Work() {}

SocketsUdpSetBroadcastFunction::SocketsUdpSetBroadcastFunction() = default;

SocketsUdpSetBroadcastFunction::~SocketsUdpSetBroadcastFunction() = default;

ExtensionFunction::ResponseAction SocketsUdpSetBroadcastFunction::Work() {}

void SocketsUdpSetBroadcastFunction::OnCompleted(int net_result) {}

}  // namespace api
}  // namespace extensions