Bug 1848242 - Mark basic.any.html subtest as intermittent. a=test-only
[gecko.git] / third_party / libwebrtc / pc / peer_connection_message_handler.h
blob8bd0e5ebb1495d8904d53c8486ec68e4fae3d897
1 /*
2 * Copyright 2020 The WebRTC project authors. All Rights Reserved.
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
11 #ifndef PC_PEER_CONNECTION_MESSAGE_HANDLER_H_
12 #define PC_PEER_CONNECTION_MESSAGE_HANDLER_H_
14 #include <functional>
16 #include "api/jsep.h"
17 #include "api/legacy_stats_types.h"
18 #include "api/media_stream_interface.h"
19 #include "api/peer_connection_interface.h"
20 #include "api/rtc_error.h"
21 #include "api/task_queue/pending_task_safety_flag.h"
22 #include "api/task_queue/task_queue_base.h"
23 #include "pc/legacy_stats_collector_interface.h"
25 namespace webrtc {
27 class PeerConnectionMessageHandler {
28 public:
29 explicit PeerConnectionMessageHandler(rtc::Thread* signaling_thread)
30 : signaling_thread_(signaling_thread) {}
31 ~PeerConnectionMessageHandler() = default;
33 void PostSetSessionDescriptionSuccess(
34 SetSessionDescriptionObserver* observer);
35 void PostSetSessionDescriptionFailure(SetSessionDescriptionObserver* observer,
36 RTCError&& error);
37 void PostCreateSessionDescriptionFailure(
38 CreateSessionDescriptionObserver* observer,
39 RTCError error);
40 void PostGetStats(StatsObserver* observer,
41 LegacyStatsCollectorInterface* legacy_stats,
42 MediaStreamTrackInterface* track);
43 void RequestUsagePatternReport(std::function<void()>, int delay_ms);
45 private:
46 ScopedTaskSafety safety_;
47 TaskQueueBase* const signaling_thread_;
50 } // namespace webrtc
52 #endif // PC_PEER_CONNECTION_MESSAGE_HANDLER_H_