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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 protected: | 75 protected: |
76 MediaKeys(ExecutionContext*, const String& keySystem, PassOwnPtr<blink::WebC
ontentDecryptionModule>); | 76 MediaKeys(ExecutionContext*, const String& keySystem, PassOwnPtr<blink::WebC
ontentDecryptionModule>); |
77 void initializeNewSessionTimerFired(Timer<MediaKeys>*); | 77 void initializeNewSessionTimerFired(Timer<MediaKeys>*); |
78 | 78 |
79 HTMLMediaElement* m_mediaElement; | 79 HTMLMediaElement* m_mediaElement; |
80 const String m_keySystem; | 80 const String m_keySystem; |
81 OwnPtr<blink::WebContentDecryptionModule> m_cdm; | 81 OwnPtr<blink::WebContentDecryptionModule> m_cdm; |
82 | 82 |
83 // FIXME: Check whether |initData| can be changed by JS. Maybe we should not
pass it as a pointer. | 83 // FIXME: Check whether |initData| can be changed by JS. Maybe we should not
pass it as a pointer. |
84 struct InitializeNewSessionData { | 84 struct InitializeNewSessionData { |
| 85 ALLOW_ONLY_INLINE_ALLOCATION(); |
| 86 public: |
85 InitializeNewSessionData(PassRefPtrWillBeRawPtr<MediaKeySession> session
, const String& contentType, PassRefPtr<Uint8Array> initData) | 87 InitializeNewSessionData(PassRefPtrWillBeRawPtr<MediaKeySession> session
, const String& contentType, PassRefPtr<Uint8Array> initData) |
86 : session(session) | 88 : session(session) |
87 , contentType(contentType) | 89 , contentType(contentType) |
88 , initData(initData) { } | 90 , initData(initData) { } |
89 | 91 |
90 void trace(Visitor*); | 92 void trace(Visitor*); |
91 | 93 |
92 RefPtrWillBeMember<MediaKeySession> session; | 94 RefPtrWillBeMember<MediaKeySession> session; |
93 String contentType; | 95 String contentType; |
94 RefPtr<Uint8Array> initData; | 96 RefPtr<Uint8Array> initData; |
95 }; | 97 }; |
96 Deque<InitializeNewSessionData> m_pendingInitializeNewSessionData; | 98 Deque<InitializeNewSessionData> m_pendingInitializeNewSessionData; |
97 Timer<MediaKeys> m_initializeNewSessionTimer; | 99 Timer<MediaKeys> m_initializeNewSessionTimer; |
98 | 100 |
99 WeakPtrFactory<MediaKeys> m_weakFactory; | 101 WeakPtrFactory<MediaKeys> m_weakFactory; |
100 }; | 102 }; |
101 | 103 |
102 } | 104 } |
103 | 105 |
104 #endif // MediaKeys_h | 106 #endif // MediaKeys_h |
OLD | NEW |