| 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 24 matching lines...) Expand all Loading... |
| 35 #include "modules/encryptedmedia/MediaKeySession.h" | 35 #include "modules/encryptedmedia/MediaKeySession.h" |
| 36 #include "modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.h" | 36 #include "modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.h" |
| 37 #include "platform/Logging.h" | 37 #include "platform/Logging.h" |
| 38 #include "platform/Timer.h" | 38 #include "platform/Timer.h" |
| 39 #include "public/platform/WebContentDecryptionModule.h" | 39 #include "public/platform/WebContentDecryptionModule.h" |
| 40 #include "wtf/RefPtr.h" | 40 #include "wtf/RefPtr.h" |
| 41 | 41 |
| 42 namespace blink { | 42 namespace blink { |
| 43 | 43 |
| 44 // A class holding a pending action. | 44 // A class holding a pending action. |
| 45 class MediaKeys::PendingAction final : public GarbageCollected<MediaKeys::Pendin
gAction> { | 45 class MediaKeys::PendingAction : public GarbageCollectedFinalized<MediaKeys::Pen
dingAction> { |
| 46 public: | 46 public: |
| 47 const Persistent<ContentDecryptionModuleResult> result() const | 47 const Persistent<ContentDecryptionModuleResult> result() const |
| 48 { | 48 { |
| 49 return m_result; | 49 return m_result; |
| 50 } | 50 } |
| 51 | 51 |
| 52 DOMArrayBuffer* data() const | 52 DOMArrayBuffer* data() const |
| 53 { | 53 { |
| 54 return m_data; | 54 return m_data; |
| 55 } | 55 } |
| 56 | 56 |
| 57 static PendingAction* CreatePendingSetServerCertificate(ContentDecryptionMod
uleResult* result, DOMArrayBuffer* serverCertificate) | 57 static PendingAction* CreatePendingSetServerCertificate(ContentDecryptionMod
uleResult* result, DOMArrayBuffer* serverCertificate) |
| 58 { | 58 { |
| 59 ASSERT(result); | 59 ASSERT(result); |
| 60 ASSERT(serverCertificate); | 60 ASSERT(serverCertificate); |
| 61 return new PendingAction(result, serverCertificate); | 61 return new PendingAction(result, serverCertificate); |
| 62 } | 62 } |
| 63 | 63 |
| 64 ~PendingAction() |
| 65 { |
| 66 } |
| 67 |
| 64 DEFINE_INLINE_TRACE() | 68 DEFINE_INLINE_TRACE() |
| 65 { | 69 { |
| 66 visitor->trace(m_result); | 70 visitor->trace(m_result); |
| 67 visitor->trace(m_data); | 71 visitor->trace(m_data); |
| 68 } | 72 } |
| 69 | 73 |
| 70 private: | 74 private: |
| 71 PendingAction(ContentDecryptionModuleResult* result, DOMArrayBuffer* data) | 75 PendingAction(ContentDecryptionModuleResult* result, DOMArrayBuffer* data) |
| 72 : m_result(result) | 76 : m_result(result) |
| 73 , m_data(data) | 77 , m_data(data) |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 void MediaKeys::stop() | 266 void MediaKeys::stop() |
| 263 { | 267 { |
| 264 ActiveDOMObject::stop(); | 268 ActiveDOMObject::stop(); |
| 265 | 269 |
| 266 if (m_timer.isActive()) | 270 if (m_timer.isActive()) |
| 267 m_timer.stop(); | 271 m_timer.stop(); |
| 268 m_pendingActions.clear(); | 272 m_pendingActions.clear(); |
| 269 } | 273 } |
| 270 | 274 |
| 271 } // namespace blink | 275 } // namespace blink |
| OLD | NEW |