| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2012 Google Inc. All rights reserved. |    2  * Copyright (C) 2012 Google Inc. All rights reserved. | 
|    3  * |    3  * | 
|    4  * Redistribution and use in source and binary forms, with or without |    4  * Redistribution and use in source and binary forms, with or without | 
|    5  * modification, are permitted provided that the following conditions are |    5  * modification, are permitted provided that the following conditions are | 
|    6  * met: |    6  * met: | 
|    7  * |    7  * | 
|    8  *     * Redistributions of source code must retain the above copyright |    8  *     * Redistributions of source code must retain the above copyright | 
|    9  * notice, this list of conditions and the following disclaimer. |    9  * notice, this list of conditions and the following disclaimer. | 
|   10  *     * Redistributions in binary form must reproduce the above |   10  *     * Redistributions in binary form must reproduce the above | 
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   44 class WebRTCICECandidate; |   44 class WebRTCICECandidate; | 
|   45 class WebRTCOfferOptions; |   45 class WebRTCOfferOptions; | 
|   46 class WebRTCSessionDescription; |   46 class WebRTCSessionDescription; | 
|   47 class WebRTCSessionDescriptionRequest; |   47 class WebRTCSessionDescriptionRequest; | 
|   48 class WebRTCStatsRequest; |   48 class WebRTCStatsRequest; | 
|   49 class WebRTCVoidRequest; |   49 class WebRTCVoidRequest; | 
|   50 class WebString; |   50 class WebString; | 
|   51 struct WebRTCConfiguration; |   51 struct WebRTCConfiguration; | 
|   52 struct WebRTCDataChannelInit; |   52 struct WebRTCDataChannelInit; | 
|   53  |   53  | 
|   54 // Used to back histogram value of |  | 
|   55 // "WebRTC.PeerConnection.SelectedRtcpMuxPolicy", so treat as append-only. |  | 
|   56 enum RtcpMuxPolicy { |  | 
|   57   RtcpMuxPolicyRequire, |  | 
|   58   RtcpMuxPolicyNegotiate, |  | 
|   59   RtcpMuxPolicyDefault, |  | 
|   60   RtcpMuxPolicyMax |  | 
|   61 }; |  | 
|   62  |  | 
|   63 class WebRTCPeerConnectionHandler { |   54 class WebRTCPeerConnectionHandler { | 
|   64  public: |   55  public: | 
|   65   virtual ~WebRTCPeerConnectionHandler() {} |   56   virtual ~WebRTCPeerConnectionHandler() {} | 
|   66  |   57  | 
|   67   virtual bool initialize(const WebRTCConfiguration&, |   58   virtual bool initialize(const WebRTCConfiguration&, | 
|   68                           const WebMediaConstraints&) = 0; |   59                           const WebMediaConstraints&) = 0; | 
|   69  |   60  | 
|   70   virtual void createOffer(const WebRTCSessionDescriptionRequest&, |   61   virtual void createOffer(const WebRTCSessionDescriptionRequest&, | 
|   71                            const WebMediaConstraints&) = 0; |   62                            const WebMediaConstraints&) = 0; | 
|   72   virtual void createOffer(const WebRTCSessionDescriptionRequest&, |   63   virtual void createOffer(const WebRTCSessionDescriptionRequest&, | 
|   73                            const WebRTCOfferOptions&) = 0; |   64                            const WebRTCOfferOptions&) = 0; | 
|   74   virtual void createAnswer(const WebRTCSessionDescriptionRequest&, |   65   virtual void createAnswer(const WebRTCSessionDescriptionRequest&, | 
|   75                             const WebMediaConstraints&) = 0; |   66                             const WebMediaConstraints&) = 0; | 
|   76   virtual void createAnswer(const WebRTCSessionDescriptionRequest&, |   67   virtual void createAnswer(const WebRTCSessionDescriptionRequest&, | 
|   77                             const WebRTCAnswerOptions&) = 0; |   68                             const WebRTCAnswerOptions&) = 0; | 
|   78   virtual void setLocalDescription(const WebRTCVoidRequest&, |   69   virtual void setLocalDescription(const WebRTCVoidRequest&, | 
|   79                                    const WebRTCSessionDescription&) = 0; |   70                                    const WebRTCSessionDescription&) = 0; | 
|   80   virtual void setRemoteDescription(const WebRTCVoidRequest&, |   71   virtual void setRemoteDescription(const WebRTCVoidRequest&, | 
|   81                                     const WebRTCSessionDescription&) = 0; |   72                                     const WebRTCSessionDescription&) = 0; | 
|   82   virtual WebRTCSessionDescription localDescription() = 0; |   73   virtual WebRTCSessionDescription localDescription() = 0; | 
|   83   virtual WebRTCSessionDescription remoteDescription() = 0; |   74   virtual WebRTCSessionDescription remoteDescription() = 0; | 
|   84   virtual bool setConfiguration(const WebRTCConfiguration&) = 0; |   75   virtual bool setConfiguration(const WebRTCConfiguration&) = 0; | 
|   85   virtual void logSelectedRtcpMuxPolicy(RtcpMuxPolicy) = 0; |  | 
|   86  |   76  | 
|   87   // DEPRECATED |   77   // DEPRECATED | 
|   88   virtual bool addICECandidate(const WebRTCICECandidate&) { return false; } |   78   virtual bool addICECandidate(const WebRTCICECandidate&) { return false; } | 
|   89  |   79  | 
|   90   virtual bool addICECandidate(const WebRTCVoidRequest&, |   80   virtual bool addICECandidate(const WebRTCVoidRequest&, | 
|   91                                const WebRTCICECandidate&) { |   81                                const WebRTCICECandidate&) { | 
|   92     return false; |   82     return false; | 
|   93   } |   83   } | 
|   94   virtual bool addStream(const WebMediaStream&, const WebMediaConstraints&) = 0; |   84   virtual bool addStream(const WebMediaStream&, const WebMediaConstraints&) = 0; | 
|   95   virtual void removeStream(const WebMediaStream&) = 0; |   85   virtual void removeStream(const WebMediaStream&) = 0; | 
|   96   virtual void getStats(const WebRTCStatsRequest&) = 0; |   86   virtual void getStats(const WebRTCStatsRequest&) = 0; | 
|   97   // Gets stats using the new stats collection API, see |   87   // Gets stats using the new stats collection API, see | 
|   98   // third_party/webrtc/api/stats/.  These will replace the old stats collection |   88   // third_party/webrtc/api/stats/.  These will replace the old stats collection | 
|   99   // API when the new API has matured enough. |   89   // API when the new API has matured enough. | 
|  100   virtual void getStats(std::unique_ptr<WebRTCStatsReportCallback>) = 0; |   90   virtual void getStats(std::unique_ptr<WebRTCStatsReportCallback>) = 0; | 
|  101   virtual WebRTCDataChannelHandler* createDataChannel( |   91   virtual WebRTCDataChannelHandler* createDataChannel( | 
|  102       const WebString& label, |   92       const WebString& label, | 
|  103       const WebRTCDataChannelInit&) = 0; |   93       const WebRTCDataChannelInit&) = 0; | 
|  104   virtual WebRTCDTMFSenderHandler* createDTMFSender( |   94   virtual WebRTCDTMFSenderHandler* createDTMFSender( | 
|  105       const WebMediaStreamTrack&) = 0; |   95       const WebMediaStreamTrack&) = 0; | 
|  106   virtual void stop() = 0; |   96   virtual void stop() = 0; | 
|  107 }; |   97 }; | 
|  108  |   98  | 
|  109 }  // namespace blink |   99 }  // namespace blink | 
|  110  |  100  | 
|  111 #endif  // WebRTCPeerConnectionHandler_h |  101 #endif  // WebRTCPeerConnectionHandler_h | 
| OLD | NEW |