OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Apple Inc. All rights reserved. | 2 * Copyright (C) 2013 Apple 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 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "") | 935 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "") |
936 << (m_asyncEventQueue->hasPendingEvents() | 936 << (m_asyncEventQueue->hasPendingEvents() |
937 ? " m_asyncEventQueue->hasPendingEvents()" | 937 ? " m_asyncEventQueue->hasPendingEvents()" |
938 : "") | 938 : "") |
939 << ((m_mediaKeys && !m_isClosed) ? " m_mediaKeys && !m_isClosed" : ""); | 939 << ((m_mediaKeys && !m_isClosed) ? " m_mediaKeys && !m_isClosed" : ""); |
940 | 940 |
941 return !m_pendingActions.isEmpty() || m_asyncEventQueue->hasPendingEvents() || | 941 return !m_pendingActions.isEmpty() || m_asyncEventQueue->hasPendingEvents() || |
942 (m_mediaKeys && !m_isClosed); | 942 (m_mediaKeys && !m_isClosed); |
943 } | 943 } |
944 | 944 |
945 void MediaKeySession::stop() { | 945 void MediaKeySession::contextDestroyed() { |
946 // Stop the CDM from firing any more events for this session. | 946 // Stop the CDM from firing any more events for this session. |
947 m_session.reset(); | 947 m_session.reset(); |
948 m_isClosed = true; | 948 m_isClosed = true; |
949 | 949 |
950 if (m_actionTimer.isActive()) | 950 if (m_actionTimer.isActive()) |
951 m_actionTimer.stop(); | 951 m_actionTimer.stop(); |
952 m_pendingActions.clear(); | 952 m_pendingActions.clear(); |
953 m_asyncEventQueue->close(); | 953 m_asyncEventQueue->close(); |
954 } | 954 } |
955 | 955 |
956 DEFINE_TRACE(MediaKeySession) { | 956 DEFINE_TRACE(MediaKeySession) { |
957 visitor->trace(m_asyncEventQueue); | 957 visitor->trace(m_asyncEventQueue); |
958 visitor->trace(m_pendingActions); | 958 visitor->trace(m_pendingActions); |
959 visitor->trace(m_mediaKeys); | 959 visitor->trace(m_mediaKeys); |
960 visitor->trace(m_keyStatusesMap); | 960 visitor->trace(m_keyStatusesMap); |
961 visitor->trace(m_closedPromise); | 961 visitor->trace(m_closedPromise); |
962 EventTargetWithInlineData::trace(visitor); | 962 EventTargetWithInlineData::trace(visitor); |
963 ActiveDOMObject::trace(visitor); | 963 ActiveDOMObject::trace(visitor); |
964 } | 964 } |
965 | 965 |
966 } // namespace blink | 966 } // namespace blink |
OLD | NEW |