| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 return RTCStatsResponse::create(); | 56 return RTCStatsResponse::create(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool RTCStatsRequestImpl::hasSelector() | 59 bool RTCStatsRequestImpl::hasSelector() |
| 60 { | 60 { |
| 61 return m_component; | 61 return m_component; |
| 62 } | 62 } |
| 63 | 63 |
| 64 MediaStreamComponent* RTCStatsRequestImpl::component() | 64 MediaStreamComponent* RTCStatsRequestImpl::component() |
| 65 { | 65 { |
| 66 return m_component.get(); | 66 return m_component; |
| 67 } | 67 } |
| 68 | 68 |
| 69 void RTCStatsRequestImpl::requestSucceeded(RTCStatsResponseBase* response) | 69 void RTCStatsRequestImpl::requestSucceeded(RTCStatsResponseBase* response) |
| 70 { | 70 { |
| 71 bool shouldFireCallback = m_requester ? m_requester->shouldFireGetStatsCallb
ack() : false; | 71 bool shouldFireCallback = m_requester ? m_requester->shouldFireGetStatsCallb
ack() : false; |
| 72 if (shouldFireCallback && m_successCallback) | 72 if (shouldFireCallback && m_successCallback) |
| 73 m_successCallback->handleEvent(static_cast<RTCStatsResponse*>(response))
; | 73 m_successCallback->handleEvent(static_cast<RTCStatsResponse*>(response))
; |
| 74 clear(); | 74 clear(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void RTCStatsRequestImpl::stop() | 77 void RTCStatsRequestImpl::stop() |
| 78 { | 78 { |
| 79 clear(); | 79 clear(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void RTCStatsRequestImpl::clear() | 82 void RTCStatsRequestImpl::clear() |
| 83 { | 83 { |
| 84 m_successCallback.clear(); | 84 m_successCallback.clear(); |
| 85 m_requester.clear(); | 85 m_requester.clear(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 DEFINE_TRACE(RTCStatsRequestImpl) | 88 DEFINE_TRACE(RTCStatsRequestImpl) |
| 89 { | 89 { |
| 90 visitor->trace(m_successCallback); | 90 visitor->trace(m_successCallback); |
| 91 visitor->trace(m_component); |
| 91 visitor->trace(m_requester); | 92 visitor->trace(m_requester); |
| 92 RTCStatsRequest::trace(visitor); | 93 RTCStatsRequest::trace(visitor); |
| 93 ActiveDOMObject::trace(visitor); | 94 ActiveDOMObject::trace(visitor); |
| 94 } | 95 } |
| 95 | 96 |
| 96 } // namespace blink | 97 } // namespace blink |
| OLD | NEW |