// Copyright 2018 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_ADAPTERS_ICE_TRANSPORT_PROXY_H_ #define THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_ADAPTERS_ICE_TRANSPORT_PROXY_H_ #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" #include "base/task/single_thread_task_runner.h" #include "base/threading/thread_checker.h" #include "third_party/blink/renderer/modules/peerconnection/adapters/ice_transport_adapter.h" #include "third_party/blink/renderer/modules/peerconnection/adapters/ice_transport_adapter_cross_thread_factory.h" #include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "third_party/webrtc/p2p/base/p2p_transport_channel.h" namespace rtc { class Thread; } namespace blink { class IceTransportHost; class LocalFrame; // This class allows the ICE implementation (P2PTransportChannel) to run on a // thread different from the thread from which it is controlled. All // interactions with the ICE implementation happen asynchronously. // // Terminology: // - Proxy thread: Thread from which the P2PTransportChannel is controlled. This // is the thread on which the IceTransportProxy is created. // - Host thread: Thread on which the P2PTransportChannel runs. This is usually // the WebRTC worker thread and is specified when creating the // IceTransportProxy. // // The client must create the IceTransportProxy on the same thread it wishes // to control it from. The Proxy will manage all cross-thread interactions; the // client should call all methods from the proxy thread and all callbacks will // be run on the proxy thread. class IceTransportProxy final { … }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_ADAPTERS_ICE_TRANSPORT_PROXY_H_