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

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

Issue 85263006: Make IDL Callbacks non-refcounted by default (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 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 | Annotate | Revision Log
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 class RTCSessionDescriptionCallback; 55 class RTCSessionDescriptionCallback;
56 class RTCStatsCallback; 56 class RTCStatsCallback;
57 class VoidCallback; 57 class VoidCallback;
58 58
59 class RTCPeerConnection : public RefCounted<RTCPeerConnection>, public ScriptWra ppable, public RTCPeerConnectionHandlerClient, public EventTargetWithInlineData, public ActiveDOMObject { 59 class RTCPeerConnection : public RefCounted<RTCPeerConnection>, public ScriptWra ppable, public RTCPeerConnectionHandlerClient, public EventTargetWithInlineData, public ActiveDOMObject {
60 REFCOUNTED_EVENT_TARGET(RTCPeerConnection); 60 REFCOUNTED_EVENT_TARGET(RTCPeerConnection);
61 public: 61 public:
62 static PassRefPtr<RTCPeerConnection> create(ExecutionContext*, const Diction ary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionState&); 62 static PassRefPtr<RTCPeerConnection> create(ExecutionContext*, const Diction ary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionState&);
63 ~RTCPeerConnection(); 63 ~RTCPeerConnection();
64 64
65 void createOffer(PassRefPtr<RTCSessionDescriptionCallback>, PassRefPtr<RTCEr rorCallback>, const Dictionary& mediaConstraints, ExceptionState&); 65 void createOffer(PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCEr rorCallback>, const Dictionary& mediaConstraints, ExceptionState&);
66 66
67 void createAnswer(PassRefPtr<RTCSessionDescriptionCallback>, PassRefPtr<RTCE rrorCallback>, const Dictionary& mediaConstraints, ExceptionState&); 67 void createAnswer(PassOwnPtr<RTCSessionDescriptionCallback>, PassOwnPtr<RTCE rrorCallback>, const Dictionary& mediaConstraints, ExceptionState&);
68 68
69 void setLocalDescription(PassRefPtr<RTCSessionDescription>, PassRefPtr<VoidC allback>, PassRefPtr<RTCErrorCallback>, ExceptionState&); 69 void setLocalDescription(PassRefPtr<RTCSessionDescription>, PassRefPtr<VoidC allback>, PassOwnPtr<RTCErrorCallback>, ExceptionState&);
70 PassRefPtr<RTCSessionDescription> localDescription(ExceptionState&); 70 PassRefPtr<RTCSessionDescription> localDescription(ExceptionState&);
71 71
72 void setRemoteDescription(PassRefPtr<RTCSessionDescription>, PassRefPtr<Void Callback>, PassRefPtr<RTCErrorCallback>, ExceptionState&); 72 void setRemoteDescription(PassRefPtr<RTCSessionDescription>, PassRefPtr<Void Callback>, PassOwnPtr<RTCErrorCallback>, ExceptionState&);
73 PassRefPtr<RTCSessionDescription> remoteDescription(ExceptionState&); 73 PassRefPtr<RTCSessionDescription> remoteDescription(ExceptionState&);
74 74
75 String signalingState() const; 75 String signalingState() const;
76 76
77 void updateIce(const Dictionary& rtcConfiguration, const Dictionary& mediaCo nstraints, ExceptionState&); 77 void updateIce(const Dictionary& rtcConfiguration, const Dictionary& mediaCo nstraints, ExceptionState&);
78 78
79 // DEPRECATED 79 // DEPRECATED
80 void addIceCandidate(RTCIceCandidate*, ExceptionState&); 80 void addIceCandidate(RTCIceCandidate*, ExceptionState&);
81 81
82 void addIceCandidate(RTCIceCandidate*, PassRefPtr<VoidCallback>, PassRefPtr< RTCErrorCallback>, ExceptionState&); 82 void addIceCandidate(RTCIceCandidate*, PassRefPtr<VoidCallback>, PassOwnPtr< RTCErrorCallback>, ExceptionState&);
83 83
84 String iceGatheringState() const; 84 String iceGatheringState() const;
85 85
86 String iceConnectionState() const; 86 String iceConnectionState() const;
87 87
88 MediaStreamVector getLocalStreams() const; 88 MediaStreamVector getLocalStreams() const;
89 89
90 MediaStreamVector getRemoteStreams() const; 90 MediaStreamVector getRemoteStreams() const;
91 91
92 MediaStream* getStreamById(const String& streamId); 92 MediaStream* getStreamById(const String& streamId);
93 93
94 void addStream(PassRefPtr<MediaStream>, const Dictionary& mediaConstraints, ExceptionState&); 94 void addStream(PassRefPtr<MediaStream>, const Dictionary& mediaConstraints, ExceptionState&);
95 95
96 void removeStream(PassRefPtr<MediaStream>, ExceptionState&); 96 void removeStream(PassRefPtr<MediaStream>, ExceptionState&);
97 97
98 void getStats(PassRefPtr<RTCStatsCallback> successCallback, PassRefPtr<Media StreamTrack> selector); 98 void getStats(PassOwnPtr<RTCStatsCallback> successCallback, PassRefPtr<Media StreamTrack> selector);
99 99
100 PassRefPtr<RTCDataChannel> createDataChannel(String label, const Dictionary& dataChannelDict, ExceptionState&); 100 PassRefPtr<RTCDataChannel> createDataChannel(String label, const Dictionary& dataChannelDict, ExceptionState&);
101 101
102 PassRefPtr<RTCDTMFSender> createDTMFSender(PassRefPtr<MediaStreamTrack>, Exc eptionState&); 102 PassRefPtr<RTCDTMFSender> createDTMFSender(PassRefPtr<MediaStreamTrack>, Exc eptionState&);
103 103
104 void close(ExceptionState&); 104 void close(ExceptionState&);
105 105
106 DEFINE_ATTRIBUTE_EVENT_LISTENER(negotiationneeded); 106 DEFINE_ATTRIBUTE_EVENT_LISTENER(negotiationneeded);
107 DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate); 107 DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate);
108 DEFINE_ATTRIBUTE_EVENT_LISTENER(signalingstatechange); 108 DEFINE_ATTRIBUTE_EVENT_LISTENER(signalingstatechange);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 156
157 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner; 157 AsyncMethodRunner<RTCPeerConnection> m_dispatchScheduledEventRunner;
158 Vector<RefPtr<Event> > m_scheduledEvents; 158 Vector<RefPtr<Event> > m_scheduledEvents;
159 159
160 bool m_stopped; 160 bool m_stopped;
161 }; 161 };
162 162
163 } // namespace WebCore 163 } // namespace WebCore
164 164
165 #endif // RTCPeerConnection_h 165 #endif // RTCPeerConnection_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/RTCErrorCallback.h ('k') | Source/modules/mediastream/RTCPeerConnection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698