Telemetry: Increase devtools http request timeout to 300 seconds
[chromium-blink-merge.git] / components / devtools_bridge / abstract_peer_connection.h
blob9fd04a8774e9e00b0127eda60fd816e890b956bc
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_DEVTOOLS_BRIDGE_ABSTRACT_PEER_CONNECTION_H_
6 #define COMPONENTS_DEVTOOLS_BRIDGE_ABSTRACT_PEER_CONNECTION_H_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace devtools_bridge {
14 class AbstractDataChannel;
16 /**
17 * WebRTC PeerConnection adapter for DevTools bridge.
19 class AbstractPeerConnection {
20 public:
21 /**
22 * Delegate is called on signaling thread.
24 class Delegate {
25 public:
26 Delegate() {}
27 virtual ~Delegate() {}
29 virtual void OnIceConnectionChange(bool connected) = 0;
30 virtual void OnIceCandidate(
31 const std::string& sdp_mid,
32 int sdp_mline_index,
33 const std::string& sdp) = 0;
34 virtual void OnLocalOfferCreatedAndSetSet(
35 const std::string& description) = 0;
36 virtual void OnLocalAnswerCreatedAndSetSet(
37 const std::string& description) = 0;
38 virtual void OnRemoteDescriptionSet() = 0;
39 virtual void OnFailure(const std::string& description) = 0;
41 private:
42 DISALLOW_COPY_AND_ASSIGN(Delegate);
45 AbstractPeerConnection() {}
46 virtual ~AbstractPeerConnection() {}
48 virtual void CreateAndSetLocalOffer() = 0;
49 virtual void CreateAndSetLocalAnswer() = 0;
50 virtual void SetRemoteOffer(const std::string& description) = 0;
51 virtual void SetRemoteAnswer(const std::string& description) = 0;
52 virtual void AddIceCandidate(
53 const std::string& sdp_mid,
54 int sdp_mline_index,
55 const std::string& sdp) = 0;
57 virtual scoped_ptr<AbstractDataChannel> CreateDataChannel(int channelId) = 0;
59 private:
60 DISALLOW_COPY_AND_ASSIGN(AbstractPeerConnection);
63 } // namespace devtools_bridge
65 #endif // COMPONENTS_DEVTOOLS_BRIDGE_ABSTRACT_PEER_CONNECTION_H_