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