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 : public GarbageCollectedFinalized<MediaKeys::Pen
dingAction> { | 45 class MediaKeys::PendingAction final : public GarbageCollected<MediaKeys::Pendin
gAction> { |
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 | |
68 DEFINE_INLINE_TRACE() | 64 DEFINE_INLINE_TRACE() |
69 { | 65 { |
70 visitor->trace(m_result); | 66 visitor->trace(m_result); |
71 visitor->trace(m_data); | 67 visitor->trace(m_data); |
72 } | 68 } |
73 | 69 |
74 private: | 70 private: |
75 PendingAction(ContentDecryptionModuleResult* result, DOMArrayBuffer* data) | 71 PendingAction(ContentDecryptionModuleResult* result, DOMArrayBuffer* data) |
76 : m_result(result) | 72 : m_result(result) |
77 , m_data(data) | 73 , m_data(data) |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 void MediaKeys::stop() | 262 void MediaKeys::stop() |
267 { | 263 { |
268 ActiveDOMObject::stop(); | 264 ActiveDOMObject::stop(); |
269 | 265 |
270 if (m_timer.isActive()) | 266 if (m_timer.isActive()) |
271 m_timer.stop(); | 267 m_timer.stop(); |
272 m_pendingActions.clear(); | 268 m_pendingActions.clear(); |
273 } | 269 } |
274 | 270 |
275 } // namespace blink | 271 } // namespace blink |
OLD | NEW |