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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 : ActiveDOMObject(context) | 42 : ActiveDOMObject(context) |
43 , m_successCallback(callback) | 43 , m_successCallback(callback) |
44 , m_component(selector ? selector->component() : 0) | 44 , m_component(selector ? selector->component() : 0) |
45 { | 45 { |
46 } | 46 } |
47 | 47 |
48 RTCStatsRequestImpl::~RTCStatsRequestImpl() | 48 RTCStatsRequestImpl::~RTCStatsRequestImpl() |
49 { | 49 { |
50 } | 50 } |
51 | 51 |
52 PassRefPtr<RTCStatsResponseBase> RTCStatsRequestImpl::createResponse() | 52 PassRefPtrWillBeRawPtr<RTCStatsResponseBase> RTCStatsRequestImpl::createResponse
() |
53 { | 53 { |
54 return RTCStatsResponse::create(); | 54 return RTCStatsResponse::create(); |
55 } | 55 } |
56 | 56 |
57 bool RTCStatsRequestImpl::hasSelector() | 57 bool RTCStatsRequestImpl::hasSelector() |
58 { | 58 { |
59 return m_component; | 59 return m_component; |
60 } | 60 } |
61 | 61 |
62 MediaStreamComponent* RTCStatsRequestImpl::component() | 62 MediaStreamComponent* RTCStatsRequestImpl::component() |
63 { | 63 { |
64 return m_component.get(); | 64 return m_component.get(); |
65 } | 65 } |
66 | 66 |
67 void RTCStatsRequestImpl::requestSucceeded(PassRefPtr<RTCStatsResponseBase> resp
onse) | 67 void RTCStatsRequestImpl::requestSucceeded(PassRefPtrWillBeRawPtr<RTCStatsRespon
seBase> response) |
68 { | 68 { |
69 if (!m_successCallback) | 69 if (!m_successCallback) |
70 return; | 70 return; |
71 m_successCallback->handleEvent(static_cast<RTCStatsResponse*>(response.get()
)); | 71 m_successCallback->handleEvent(static_cast<RTCStatsResponse*>(response.get()
)); |
72 clear(); | 72 clear(); |
73 } | 73 } |
74 | 74 |
75 void RTCStatsRequestImpl::stop() | 75 void RTCStatsRequestImpl::stop() |
76 { | 76 { |
77 clear(); | 77 clear(); |
78 } | 78 } |
79 | 79 |
80 void RTCStatsRequestImpl::clear() | 80 void RTCStatsRequestImpl::clear() |
81 { | 81 { |
82 m_successCallback.clear(); | 82 m_successCallback.clear(); |
83 } | 83 } |
84 | 84 |
85 } // namespace WebCore | 85 } // namespace WebCore |
OLD | NEW |