Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(838)

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h

Issue 1494543002: Add counters for nonstandard uses of RTCPeerConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update histograms.xml Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 : public RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnecti on> 61 : public RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnecti on>
62 , public WebRTCPeerConnectionHandlerClient 62 , public WebRTCPeerConnectionHandlerClient
63 , public ActiveDOMObject { 63 , public ActiveDOMObject {
64 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection); 64 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(RTCPeerConnection);
65 DEFINE_WRAPPERTYPEINFO(); 65 DEFINE_WRAPPERTYPEINFO();
66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection); 66 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(RTCPeerConnection);
67 public: 67 public:
68 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const Dictionary&, ExceptionState&); 68 static RTCPeerConnection* create(ExecutionContext*, const Dictionary&, const Dictionary&, ExceptionState&);
69 ~RTCPeerConnection() override; 69 ~RTCPeerConnection() override;
70 70
71 void createOffer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const Di ctionary&, ExceptionState&); 71 void createOffer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCError Callback*, const Dictionary&, ExceptionState&);
72 72
73 void createAnswer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const D ictionary&, ExceptionState&); 73 void createAnswer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCErro rCallback*, const Dictionary&, ExceptionState&);
74 74
75 void setLocalDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCall back*, ExceptionState&); 75 void setLocalDescription(ExecutionContext*, RTCSessionDescription*, VoidCall back*, RTCErrorCallback*, ExceptionState&);
76 RTCSessionDescription* localDescription(); 76 RTCSessionDescription* localDescription();
77 77
78 void setRemoteDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCal lback*, ExceptionState&); 78 void setRemoteDescription(ExecutionContext*, RTCSessionDescription*, VoidCal lback*, RTCErrorCallback*, ExceptionState&);
79 RTCSessionDescription* remoteDescription(); 79 RTCSessionDescription* remoteDescription();
80 80
81 String signalingState() const; 81 String signalingState() const;
82 82
83 void updateIce(const Dictionary& rtcConfiguration, const Dictionary& mediaCo nstraints, ExceptionState&); 83 void updateIce(const Dictionary& rtcConfiguration, const Dictionary& mediaCo nstraints, ExceptionState&);
84 84
85 // Certificate management 85 // Certificate management
86 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt 86 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt
87 static ScriptPromise generateCertificate(ScriptState*, const AlgorithmIdenti fier& keygenAlgorithm, ExceptionState&); 87 static ScriptPromise generateCertificate(ScriptState*, const AlgorithmIdenti fier& keygenAlgorithm, ExceptionState&);
88 88
89 // DEPRECATED 89 // DEPRECATED
90 void addIceCandidate(RTCIceCandidate*, ExceptionState&); 90 void addIceCandidate(RTCIceCandidate*, ExceptionState&);
91 91
92 void addIceCandidate(RTCIceCandidate*, VoidCallback*, RTCErrorCallback*, Exc eptionState&); 92 void addIceCandidate(RTCIceCandidate*, VoidCallback*, RTCErrorCallback*, Exc eptionState&);
93 93
94 String iceGatheringState() const; 94 String iceGatheringState() const;
95 95
96 String iceConnectionState() const; 96 String iceConnectionState() const;
97 97
98 MediaStreamVector getLocalStreams() const; 98 MediaStreamVector getLocalStreams() const;
99 99
100 MediaStreamVector getRemoteStreams() const; 100 MediaStreamVector getRemoteStreams() const;
101 101
102 MediaStream* getStreamById(const String& streamId); 102 MediaStream* getStreamById(const String& streamId);
103 103
104 void addStream(MediaStream*, const Dictionary& mediaConstraints, ExceptionSt ate&); 104 void addStream(MediaStream*, const Dictionary& mediaConstraints, ExceptionSt ate&);
105 105
106 void removeStream(MediaStream*, ExceptionState&); 106 void removeStream(MediaStream*, ExceptionState&);
107 107
108 void getStats(RTCStatsCallback* successCallback, MediaStreamTrack* selector) ; 108 void getStats(ExecutionContext*, RTCStatsCallback* successCallback, MediaStr eamTrack* selector);
109 109
110 RTCDataChannel* createDataChannel(String label, const Dictionary& dataChanne lDict, ExceptionState&); 110 RTCDataChannel* createDataChannel(String label, const Dictionary& dataChanne lDict, ExceptionState&);
111 111
112 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&); 112 RTCDTMFSender* createDTMFSender(MediaStreamTrack*, ExceptionState&);
113 113
114 void close(ExceptionState&); 114 void close(ExceptionState&);
115 115
116 // We allow getStats after close, but not other calls or callbacks. 116 // We allow getStats after close, but not other calls or callbacks.
117 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; } 117 bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; }
118 bool shouldFireGetStatsCallback() { return !m_stopped; } 118 bool shouldFireGetStatsCallback() { return !m_stopped; }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; 185 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner;
186 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents; 186 WillBeHeapVector<RefPtrWillBeMember<Event>> m_scheduledEvents;
187 187
188 bool m_stopped; 188 bool m_stopped;
189 bool m_closed; 189 bool m_closed;
190 }; 190 };
191 191
192 } // namespace blink 192 } // namespace blink
193 193
194 #endif // RTCPeerConnection_h 194 #endif // RTCPeerConnection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698