| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 63 } |
| 64 | 64 |
| 65 void RTCStatsRequestImpl::requestSucceeded(RTCStatsResponseBase* response) { | 65 void RTCStatsRequestImpl::requestSucceeded(RTCStatsResponseBase* response) { |
| 66 bool shouldFireCallback = | 66 bool shouldFireCallback = |
| 67 m_requester ? m_requester->shouldFireGetStatsCallback() : false; | 67 m_requester ? m_requester->shouldFireGetStatsCallback() : false; |
| 68 if (shouldFireCallback && m_successCallback) | 68 if (shouldFireCallback && m_successCallback) |
| 69 m_successCallback->handleEvent(static_cast<RTCStatsResponse*>(response)); | 69 m_successCallback->handleEvent(static_cast<RTCStatsResponse*>(response)); |
| 70 clear(); | 70 clear(); |
| 71 } | 71 } |
| 72 | 72 |
| 73 void RTCStatsRequestImpl::contextDestroyed() { | 73 void RTCStatsRequestImpl::contextDestroyed(ExecutionContext*) { |
| 74 clear(); | 74 clear(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void RTCStatsRequestImpl::clear() { | 77 void RTCStatsRequestImpl::clear() { |
| 78 m_successCallback.clear(); | 78 m_successCallback.clear(); |
| 79 m_requester.clear(); | 79 m_requester.clear(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 DEFINE_TRACE(RTCStatsRequestImpl) { | 82 DEFINE_TRACE(RTCStatsRequestImpl) { |
| 83 visitor->trace(m_successCallback); | 83 visitor->trace(m_successCallback); |
| 84 visitor->trace(m_component); | 84 visitor->trace(m_component); |
| 85 visitor->trace(m_requester); | 85 visitor->trace(m_requester); |
| 86 RTCStatsRequest::trace(visitor); | 86 RTCStatsRequest::trace(visitor); |
| 87 ContextLifecycleObserver::trace(visitor); | 87 ContextLifecycleObserver::trace(visitor); |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace blink | 90 } // namespace blink |
| OLD | NEW |