Chromium Code Reviews| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 void setMediaElement(HTMLMediaElement*); | 67 void setMediaElement(HTMLMediaElement*); |
| 68 | 68 |
| 69 blink::WebContentDecryptionModule* contentDecryptionModule(); | 69 blink::WebContentDecryptionModule* contentDecryptionModule(); |
| 70 | 70 |
| 71 void trace(Visitor*); | 71 void trace(Visitor*); |
| 72 | 72 |
| 73 // ContextLifecycleObserver | 73 // ContextLifecycleObserver |
| 74 virtual void contextDestroyed() OVERRIDE; | 74 virtual void contextDestroyed() OVERRIDE; |
| 75 | 75 |
| 76 protected: | 76 protected: |
| 77 static bool isSupportedKeySystem(const String& keySystem); | |
| 78 static bool isSupportedContentType(const String& keySystem, const String& co ntentType); | |
|
ddorwin
2014/02/27 23:28:27
This one can actually be a member and doesn't need
| |
| 79 | |
| 77 MediaKeys(ExecutionContext*, const String& keySystem, PassOwnPtr<ContentDecr yptionModule>); | 80 MediaKeys(ExecutionContext*, const String& keySystem, PassOwnPtr<ContentDecr yptionModule>); |
| 78 void initializeNewSessionTimerFired(Timer<MediaKeys>*); | 81 void initializeNewSessionTimerFired(Timer<MediaKeys>*); |
| 79 | 82 |
| 80 HTMLMediaElement* m_mediaElement; | 83 HTMLMediaElement* m_mediaElement; |
| 81 const String m_keySystem; | 84 const String m_keySystem; |
| 82 OwnPtr<ContentDecryptionModule> m_cdm; | 85 OwnPtr<ContentDecryptionModule> m_cdm; |
| 83 | 86 |
| 84 // FIXME: Check whether |initData| can be changed by JS. Maybe we should not pass it as a pointer. | 87 // FIXME: Check whether |initData| can be changed by JS. Maybe we should not pass it as a pointer. |
| 85 struct InitializeNewSessionData { | 88 struct InitializeNewSessionData { |
| 86 InitializeNewSessionData(PassRefPtrWillBeRawPtr<MediaKeySession> session , const String& contentType, PassRefPtr<Uint8Array> initData) | 89 InitializeNewSessionData(PassRefPtrWillBeRawPtr<MediaKeySession> session , const String& contentType, PassRefPtr<Uint8Array> initData) |
| 87 : session(session) | 90 : session(session) |
| 88 , contentType(contentType) | 91 , contentType(contentType) |
| 89 , initData(initData) { } | 92 , initData(initData) { } |
| 90 | 93 |
| 91 void trace(Visitor*); | 94 void trace(Visitor*); |
| 92 | 95 |
| 93 RefPtrWillBeMember<MediaKeySession> session; | 96 RefPtrWillBeMember<MediaKeySession> session; |
| 94 String contentType; | 97 String contentType; |
| 95 RefPtr<Uint8Array> initData; | 98 RefPtr<Uint8Array> initData; |
| 96 }; | 99 }; |
| 97 Deque<InitializeNewSessionData> m_pendingInitializeNewSessionData; | 100 Deque<InitializeNewSessionData> m_pendingInitializeNewSessionData; |
| 98 Timer<MediaKeys> m_initializeNewSessionTimer; | 101 Timer<MediaKeys> m_initializeNewSessionTimer; |
| 99 | 102 |
| 100 WeakPtrFactory<MediaKeys> m_weakFactory; | 103 WeakPtrFactory<MediaKeys> m_weakFactory; |
| 101 }; | 104 }; |
| 102 | 105 |
| 103 } | 106 } |
| 104 | 107 |
| 105 #endif // MediaKeys_h | 108 #endif // MediaKeys_h |
| OLD | NEW |