chromium/ipc/ipc_channel_proxy.cc

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

#include "ipc/ipc_channel_proxy.h"

#include <stddef.h>
#include <stdint.h>

#include <utility>

#include "base/compiler_specific.h"
#include "base/containers/contains.h"
#include "base/functional/bind.h"
#include "base/location.h"
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/task/single_thread_task_runner.h"
#include "build/build_config.h"
#include "ipc/ipc_channel_factory.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_logging.h"
#include "ipc/ipc_message_macros.h"
#include "ipc/message_filter.h"
#include "ipc/message_filter_router.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"

namespace IPC {

//------------------------------------------------------------------------------

ChannelProxy::Context::Context(
    Listener* listener,
    const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
    const scoped_refptr<base::SingleThreadTaskRunner>& listener_task_runner)
    :{}

ChannelProxy::Context::~Context() = default;

void ChannelProxy::Context::ClearIPCTaskRunner() {}

void ChannelProxy::Context::CreateChannel(
    std::unique_ptr<ChannelFactory> factory) {}

bool ChannelProxy::Context::TryFilters(const Message& message) {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::PauseChannel() {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::UnpauseChannel(bool flush) {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::FlushChannel() {}

// Called on the IPC::Channel thread
bool ChannelProxy::Context::OnMessageReceived(const Message& message) {}

// Called on the IPC::Channel thread
bool ChannelProxy::Context::OnMessageReceivedNoFilter(const Message& message) {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::OnChannelConnected(int32_t peer_pid) {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::OnChannelError() {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::OnAssociatedInterfaceRequest(
    const std::string& interface_name,
    mojo::ScopedInterfaceEndpointHandle handle) {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::OnChannelOpened() {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::OnChannelClosed() {}

void ChannelProxy::Context::Clear() {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::OnSendMessage(std::unique_ptr<Message> message) {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::OnAddFilter() {}

// Called on the IPC::Channel thread
void ChannelProxy::Context::OnRemoveFilter(MessageFilter* filter) {}

// Called on the listener's thread
void ChannelProxy::Context::AddFilter(MessageFilter* filter) {}

// Called on the listener's thread
void ChannelProxy::Context::OnDispatchMessage(const Message& message) {}

// Called on the listener's thread.
void ChannelProxy::Context::AddListenerTaskRunner(
    int32_t routing_id,
    scoped_refptr<base::SingleThreadTaskRunner> task_runner) {}

// Called on the listener's thread.
void ChannelProxy::Context::RemoveListenerTaskRunner(int32_t routing_id) {}

// Called on the IPC::Channel thread.
scoped_refptr<base::SingleThreadTaskRunner>
ChannelProxy::Context::GetTaskRunner(int32_t routing_id) {}

// Called on the listener's thread
void ChannelProxy::Context::OnDispatchConnected() {}

// Called on the listener's thread
void ChannelProxy::Context::OnDispatchError() {}

// Called on the listener's thread
void ChannelProxy::Context::OnDispatchBadMessage(const Message& message) {}

// Called on the listener's thread
void ChannelProxy::Context::OnDispatchAssociatedInterfaceRequest(
    const std::string& interface_name,
    mojo::ScopedInterfaceEndpointHandle handle) {}

void ChannelProxy::Context::ClearChannel() {}

void ChannelProxy::Context::AddGenericAssociatedInterfaceForIOThread(
    const std::string& name,
    const GenericAssociatedInterfaceFactory& factory) {}

void ChannelProxy::Context::Send(Message* message) {}

// Called on the listener's thread.
void ChannelProxy::Context::SetUrgentMessageObserver(
    UrgentMessageObserver* observer) {}

//-----------------------------------------------------------------------------

// static
std::unique_ptr<ChannelProxy> ChannelProxy::Create(
    const IPC::ChannelHandle& channel_handle,
    Channel::Mode mode,
    Listener* listener,
    const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
    const scoped_refptr<base::SingleThreadTaskRunner>& listener_task_runner) {}

// static
std::unique_ptr<ChannelProxy> ChannelProxy::Create(
    std::unique_ptr<ChannelFactory> factory,
    Listener* listener,
    const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
    const scoped_refptr<base::SingleThreadTaskRunner>& listener_task_runner) {}

ChannelProxy::ChannelProxy(Context* context) :{}

ChannelProxy::ChannelProxy(
    Listener* listener,
    const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner,
    const scoped_refptr<base::SingleThreadTaskRunner>& listener_task_runner)
    :{}

ChannelProxy::~ChannelProxy() {}

void ChannelProxy::Init(const IPC::ChannelHandle& channel_handle,
                        Channel::Mode mode,
                        bool create_pipe_now) {}

void ChannelProxy::Init(std::unique_ptr<ChannelFactory> factory,
                        bool create_pipe_now) {}

void ChannelProxy::Pause() {}

void ChannelProxy::Unpause(bool flush) {}

void ChannelProxy::Flush() {}

void ChannelProxy::Close() {}

bool ChannelProxy::Send(Message* message) {}

void ChannelProxy::SendInternal(Message* message) {}

void ChannelProxy::AddFilter(MessageFilter* filter) {}

void ChannelProxy::RemoveFilter(MessageFilter* filter) {}

void ChannelProxy::AddGenericAssociatedInterfaceForIOThread(
    const std::string& name,
    const GenericAssociatedInterfaceFactory& factory) {}

void ChannelProxy::GetRemoteAssociatedInterface(
    mojo::GenericPendingAssociatedReceiver receiver) {}

void ChannelProxy::ClearIPCTaskRunner() {}

void ChannelProxy::OnChannelInit() {}

void ChannelProxy::SetUrgentMessageObserver(UrgentMessageObserver* observer) {}

//-----------------------------------------------------------------------------

}  // namespace IPC