| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebRTCStats_h | 5 #ifndef WebRTCStats_h |
| 6 #define WebRTCStats_h | 6 #define WebRTCStats_h |
| 7 | 7 |
| 8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
| 9 #include "WebString.h" | 9 #include "WebString.h" |
| 10 #include "WebVector.h" | 10 #include "WebVector.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 virtual ~WebRTCStatsReport(); | 41 virtual ~WebRTCStatsReport(); |
| 42 // Creates a new report object that is a handle to the same underlying stats | 42 // Creates a new report object that is a handle to the same underlying stats |
| 43 // report (the stats are not copied). The new report's iterator is reset, | 43 // report (the stats are not copied). The new report's iterator is reset, |
| 44 // useful when needing multiple iterators. | 44 // useful when needing multiple iterators. |
| 45 virtual std::unique_ptr<WebRTCStatsReport> CopyHandle() const = 0; | 45 virtual std::unique_ptr<WebRTCStatsReport> CopyHandle() const = 0; |
| 46 | 46 |
| 47 // Gets stats object by |id|, or null if no stats with that |id| exists. | 47 // Gets stats object by |id|, or null if no stats with that |id| exists. |
| 48 virtual std::unique_ptr<WebRTCStats> GetStats(WebString id) const = 0; | 48 virtual std::unique_ptr<WebRTCStats> GetStats(WebString id) const = 0; |
| 49 // The next stats object, or null if the end has been reached. | 49 // The next stats object, or null if the end has been reached. |
| 50 virtual std::unique_ptr<WebRTCStats> Next() = 0; | 50 virtual std::unique_ptr<WebRTCStats> Next() = 0; |
| 51 // The number of stats objects. |
| 52 virtual size_t Size() const = 0; |
| 51 }; | 53 }; |
| 52 | 54 |
| 53 class BLINK_PLATFORM_EXPORT WebRTCStats { | 55 class BLINK_PLATFORM_EXPORT WebRTCStats { |
| 54 public: | 56 public: |
| 55 virtual ~WebRTCStats(); | 57 virtual ~WebRTCStats(); |
| 56 | 58 |
| 57 virtual WebString Id() const = 0; | 59 virtual WebString Id() const = 0; |
| 58 virtual WebString GetType() const = 0; | 60 virtual WebString GetType() const = 0; |
| 59 virtual double Timestamp() const = 0; | 61 virtual double Timestamp() const = 0; |
| 60 | 62 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 class BLINK_PLATFORM_EXPORT WebRTCStatsReportCallback { | 94 class BLINK_PLATFORM_EXPORT WebRTCStatsReportCallback { |
| 93 public: | 95 public: |
| 94 virtual ~WebRTCStatsReportCallback(); | 96 virtual ~WebRTCStatsReportCallback(); |
| 95 | 97 |
| 96 virtual void OnStatsDelivered(std::unique_ptr<WebRTCStatsReport>) = 0; | 98 virtual void OnStatsDelivered(std::unique_ptr<WebRTCStatsReport>) = 0; |
| 97 }; | 99 }; |
| 98 | 100 |
| 99 } // namespace blink | 101 } // namespace blink |
| 100 | 102 |
| 101 #endif // WebRTCStats_h | 103 #endif // WebRTCStats_h |
| OLD | NEW |