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 12 matching lines...) Expand all Loading... |
23 */ | 23 */ |
24 | 24 |
25 #ifndef WebRTCStatsResponse_h | 25 #ifndef WebRTCStatsResponse_h |
26 #define WebRTCStatsResponse_h | 26 #define WebRTCStatsResponse_h |
27 | 27 |
28 #include "WebCommon.h" | 28 #include "WebCommon.h" |
29 #include "WebPrivatePtr.h" | 29 #include "WebPrivatePtr.h" |
30 #include "WebString.h" | 30 #include "WebString.h" |
31 | 31 |
32 namespace blink { | 32 namespace blink { |
| 33 |
33 class RTCStatsResponseBase; | 34 class RTCStatsResponseBase; |
34 } | |
35 | |
36 namespace blink { | |
37 | 35 |
38 class WebRTCStatsResponse { | 36 class WebRTCStatsResponse { |
39 public: | 37 public: |
40 WebRTCStatsResponse(const WebRTCStatsResponse& other) { assign(other); } | 38 WebRTCStatsResponse(const WebRTCStatsResponse& other) { assign(other); } |
41 WebRTCStatsResponse() { } | 39 WebRTCStatsResponse() { } |
42 ~WebRTCStatsResponse() { reset(); } | 40 ~WebRTCStatsResponse() { reset(); } |
43 | 41 |
44 WebRTCStatsResponse& operator=(const WebRTCStatsResponse& other) | 42 WebRTCStatsResponse& operator=(const WebRTCStatsResponse& other) |
45 { | 43 { |
46 assign(other); | 44 assign(other); |
47 return *this; | 45 return *this; |
48 } | 46 } |
49 | 47 |
50 BLINK_PLATFORM_EXPORT void assign(const WebRTCStatsResponse&); | 48 BLINK_PLATFORM_EXPORT void assign(const WebRTCStatsResponse&); |
51 | 49 |
52 BLINK_PLATFORM_EXPORT void reset(); | 50 BLINK_PLATFORM_EXPORT void reset(); |
53 | 51 |
54 BLINK_PLATFORM_EXPORT size_t addReport(const WebString& id, const WebString&
type, double timestamp); | 52 BLINK_PLATFORM_EXPORT size_t addReport(const WebString& id, const WebString&
type, double timestamp); |
55 BLINK_PLATFORM_EXPORT void addStatistic(size_t report, const WebString& name
, const WebString& value); | 53 BLINK_PLATFORM_EXPORT void addStatistic(size_t report, const WebString& name
, const WebString& value); |
56 | 54 |
57 #if INSIDE_BLINK | 55 #if INSIDE_BLINK |
58 BLINK_PLATFORM_EXPORT WebRTCStatsResponse(blink::RTCStatsResponseBase*); | 56 BLINK_PLATFORM_EXPORT WebRTCStatsResponse(RTCStatsResponseBase*); |
59 BLINK_PLATFORM_EXPORT operator blink::RTCStatsResponseBase*() const; | 57 BLINK_PLATFORM_EXPORT operator RTCStatsResponseBase*() const; |
60 #endif | 58 #endif |
61 | 59 |
62 private: | 60 private: |
63 WebPrivatePtr<blink::RTCStatsResponseBase> m_private; | 61 WebPrivatePtr<RTCStatsResponseBase> m_private; |
64 }; | 62 }; |
65 | 63 |
66 } // namespace blink | 64 } // namespace blink |
67 | 65 |
68 #endif // WebRTCStatsResponse_h | 66 #endif // WebRTCStatsResponse_h |
OLD | NEW |