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 15 matching lines...) Expand all Loading... |
26 | 26 |
27 #include "public/platform/WebRTCStatsResponse.h" | 27 #include "public/platform/WebRTCStatsResponse.h" |
28 | 28 |
29 #include "platform/mediastream/RTCStatsResponseBase.h" | 29 #include "platform/mediastream/RTCStatsResponseBase.h" |
30 #include "wtf/PassOwnPtr.h" | 30 #include "wtf/PassOwnPtr.h" |
31 | 31 |
32 using namespace WebCore; | 32 using namespace WebCore; |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 WebRTCStatsResponse::WebRTCStatsResponse(const PassRefPtr<RTCStatsResponseBase>&
request) | 36 WebRTCStatsResponse::WebRTCStatsResponse(const PassRefPtrWillBeRawPtr<RTCStatsRe
sponseBase>& request) |
37 : m_private(request) | 37 : m_private(request) |
38 { | 38 { |
39 } | 39 } |
40 | 40 |
41 void WebRTCStatsResponse::assign(const WebRTCStatsResponse& other) | 41 void WebRTCStatsResponse::assign(const WebRTCStatsResponse& other) |
42 { | 42 { |
43 m_private = other.m_private; | 43 m_private = other.m_private; |
44 } | 44 } |
45 | 45 |
46 void WebRTCStatsResponse::reset() | 46 void WebRTCStatsResponse::reset() |
47 { | 47 { |
48 m_private.reset(); | 48 m_private.reset(); |
49 } | 49 } |
50 | 50 |
51 WebRTCStatsResponse::operator WTF::PassRefPtr<WebCore::RTCStatsResponseBase>() c
onst | 51 WebRTCStatsResponse::operator PassRefPtrWillBeRawPtr<WebCore::RTCStatsResponseBa
se>() const |
52 { | 52 { |
53 return m_private.get(); | 53 return m_private.get(); |
54 } | 54 } |
55 | 55 |
56 size_t WebRTCStatsResponse::addReport(WebString id, WebString type, double times
tamp) | 56 size_t WebRTCStatsResponse::addReport(WebString id, WebString type, double times
tamp) |
57 { | 57 { |
58 ASSERT(!m_private.isNull()); | 58 ASSERT(!m_private.isNull()); |
59 return m_private->addReport(id, type, timestamp); | 59 return m_private->addReport(id, type, timestamp); |
60 } | 60 } |
61 | 61 |
62 void WebRTCStatsResponse::addStatistic(size_t report, WebString name, WebString
value) | 62 void WebRTCStatsResponse::addStatistic(size_t report, WebString name, WebString
value) |
63 { | 63 { |
64 ASSERT(!m_private.isNull()); | 64 ASSERT(!m_private.isNull()); |
65 m_private->addStatistic(report, name, value); | 65 m_private->addStatistic(report, name, value); |
66 } | 66 } |
67 | 67 |
68 } // namespace blink | 68 } // namespace blink |
69 | 69 |
OLD | NEW |