| 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef RTCStatsRequestImpl_h | 25 #ifndef RTCStatsRequestImpl_h |
| 26 #define RTCStatsRequestImpl_h | 26 #define RTCStatsRequestImpl_h |
| 27 | 27 |
| 28 #include "core/dom/ActiveDOMObject.h" | 28 #include "core/dom/ActiveDOMObject.h" |
| 29 #include "core/platform/mediastream/RTCStatsRequest.h" | 29 #include "core/platform/mediastream/RTCStatsRequest.h" |
| 30 #include "modules/mediastream/RTCStatsResponse.h" | 30 #include "modules/mediastream/RTCStatsResponse.h" |
| 31 #include "public/platform/WebMediaStream.h" | |
| 32 #include "wtf/PassRefPtr.h" | 31 #include "wtf/PassRefPtr.h" |
| 33 #include "wtf/RefCounted.h" | 32 #include "wtf/RefCounted.h" |
| 34 #include "wtf/text/WTFString.h" | 33 #include "wtf/text/WTFString.h" |
| 35 | 34 |
| 36 namespace WebCore { | 35 namespace WebCore { |
| 37 | 36 |
| 38 class MediaStreamTrack; | 37 class MediaStreamTrack; |
| 39 class RTCStatsCallback; | 38 class RTCStatsCallback; |
| 40 | 39 |
| 41 class RTCStatsRequestImpl : public RTCStatsRequest, public ActiveDOMObject { | 40 class RTCStatsRequestImpl : public RTCStatsRequest, public ActiveDOMObject { |
| 42 public: | 41 public: |
| 43 static PassRefPtr<RTCStatsRequestImpl> create(ScriptExecutionContext*, PassR
efPtr<RTCStatsCallback>, PassRefPtr<MediaStreamTrack>); | 42 static PassRefPtr<RTCStatsRequestImpl> create(ScriptExecutionContext*, PassR
efPtr<RTCStatsCallback>, PassRefPtr<MediaStreamTrack>); |
| 44 virtual ~RTCStatsRequestImpl(); | 43 virtual ~RTCStatsRequestImpl(); |
| 45 | 44 |
| 46 virtual PassRefPtr<RTCStatsResponseBase> createResponse() OVERRIDE; | 45 virtual PassRefPtr<RTCStatsResponseBase> createResponse() OVERRIDE; |
| 47 virtual bool hasSelector() OVERRIDE; | 46 virtual bool hasSelector() OVERRIDE; |
| 48 virtual WebKit::WebMediaStream stream() OVERRIDE; | 47 virtual MediaStreamDescriptor* stream() OVERRIDE; |
| 49 virtual MediaStreamComponent* component() OVERRIDE; | 48 virtual MediaStreamComponent* component() OVERRIDE; |
| 50 | 49 |
| 51 virtual void requestSucceeded(PassRefPtr<RTCStatsResponseBase>) OVERRIDE; | 50 virtual void requestSucceeded(PassRefPtr<RTCStatsResponseBase>) OVERRIDE; |
| 52 | 51 |
| 53 // ActiveDOMObject | 52 // ActiveDOMObject |
| 54 virtual void stop() OVERRIDE; | 53 virtual void stop() OVERRIDE; |
| 55 | 54 |
| 56 private: | 55 private: |
| 57 RTCStatsRequestImpl(ScriptExecutionContext*, PassRefPtr<RTCStatsCallback>, P
assRefPtr<MediaStreamTrack>); | 56 RTCStatsRequestImpl(ScriptExecutionContext*, PassRefPtr<RTCStatsCallback>, P
assRefPtr<MediaStreamTrack>); |
| 58 | 57 |
| 59 void clear(); | 58 void clear(); |
| 60 | 59 |
| 61 RefPtr<RTCStatsCallback> m_successCallback; | 60 RefPtr<RTCStatsCallback> m_successCallback; |
| 62 WebKit::WebMediaStream m_webStream; | 61 RefPtr<MediaStreamDescriptor> m_stream; |
| 63 RefPtr<MediaStreamComponent> m_component; | 62 RefPtr<MediaStreamComponent> m_component; |
| 64 }; | 63 }; |
| 65 | 64 |
| 66 } // namespace WebCore | 65 } // namespace WebCore |
| 67 | 66 |
| 68 #endif // RTCStatsRequestImpl_h | 67 #endif // RTCStatsRequestImpl_h |
| OLD | NEW |