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