| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // The typical usage pattern is: | 54 // The typical usage pattern is: |
| 55 // WebRTCStatsRequest request = <from somewhere> | 55 // WebRTCStatsRequest request = <from somewhere> |
| 56 // WebRTCStatsResponse response = request.createResponse(); | 56 // WebRTCStatsResponse response = request.createResponse(); |
| 57 // | 57 // |
| 58 // For each item on which statistics are going to be reported: | 58 // For each item on which statistics are going to be reported: |
| 59 // size_t reportIndex = response.addReport(); | 59 // size_t reportIndex = response.addReport(); |
| 60 // Add local information: | 60 // Add local information: |
| 61 // size_t elementIndex = response.addElement(reportIndex, true, dateNow()); | 61 // size_t elementIndex = response.addElement(reportIndex, true, dateNow()); |
| 62 // For each statistic being reported on: | 62 // For each statistic being reported on: |
| 63 // response.addStatistic(reportIndex, true, elementIndex, | 63 // response.addStatistic(reportIndex, true, elementIndex, |
| 64 // "name of statistic", "statistic value"); | 64 // "name of statistic", "statistic value"); |
| 65 // Remote information (typically RTCP-derived) is added in the same way. | 65 // Remote information (typically RTCP-derived) is added in the same way. |
| 66 // When finished adding information: | 66 // When finished adding information: |
| 67 // request.requestSucceeded(response); | 67 // request.requestSucceeded(response); |
| 68 | 68 |
| 69 class WebRTCStatsRequest { | 69 class WebRTCStatsRequest { |
| 70 public: | 70 public: |
| 71 WebRTCStatsRequest() { } | 71 WebRTCStatsRequest() { } |
| 72 WebRTCStatsRequest(const WebRTCStatsRequest& other) { assign(other); } | 72 WebRTCStatsRequest(const WebRTCStatsRequest& other) { assign(other); } |
| 73 ~WebRTCStatsRequest() { reset(); } | 73 ~WebRTCStatsRequest() { reset(); } |
| 74 | 74 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 100 WebRTCStatsRequest(const WTF::PassRefPtr<WebCore::RTCStatsRequest>&); | 100 WebRTCStatsRequest(const WTF::PassRefPtr<WebCore::RTCStatsRequest>&); |
| 101 #endif | 101 #endif |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 WebPrivatePtr<WebCore::RTCStatsRequest> m_private; | 104 WebPrivatePtr<WebCore::RTCStatsRequest> m_private; |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace WebKit | 107 } // namespace WebKit |
| 108 | 108 |
| 109 #endif // WebRTCStatsRequest_h | 109 #endif // WebRTCStatsRequest_h |
| OLD | NEW |