| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // References are held by JS and HTMLMediaElement. | 46 // References are held by JS and HTMLMediaElement. |
| 47 // The WebContentDecryptionModule has the same lifetime as this object. | 47 // The WebContentDecryptionModule has the same lifetime as this object. |
| 48 class MediaKeys : public GarbageCollectedFinalized<MediaKeys>, public ContextLif
ecycleObserver, public ScriptWrappable { | 48 class MediaKeys : public GarbageCollectedFinalized<MediaKeys>, public ContextLif
ecycleObserver, public ScriptWrappable { |
| 49 public: | 49 public: |
| 50 static ScriptPromise create(ScriptState*, const String& keySystem); | 50 static ScriptPromise create(ScriptState*, const String& keySystem); |
| 51 virtual ~MediaKeys(); | 51 virtual ~MediaKeys(); |
| 52 | 52 |
| 53 const String& keySystem() const { return m_keySystem; } | 53 const String& keySystem() const { return m_keySystem; } |
| 54 | 54 |
| 55 ScriptPromise createSession(ScriptState*, const String& initDataType, Uint8A
rray* initData, const String& sessionType); | 55 ScriptPromise createSession(ScriptState*, const String& initDataType, ArrayB
ufferView* initData, const String& sessionType); |
| 56 | 56 |
| 57 static bool isTypeSupported(const String& keySystem, const String& contentTy
pe); | 57 static bool isTypeSupported(const String& keySystem, const String& contentTy
pe); |
| 58 | 58 |
| 59 blink::WebContentDecryptionModule* contentDecryptionModule(); | 59 blink::WebContentDecryptionModule* contentDecryptionModule(); |
| 60 | 60 |
| 61 void trace(Visitor*); | 61 void trace(Visitor*); |
| 62 | 62 |
| 63 // ContextLifecycleObserver | 63 // ContextLifecycleObserver |
| 64 virtual void contextDestroyed() OVERRIDE; | 64 virtual void contextDestroyed() OVERRIDE; |
| 65 | 65 |
| 66 private: | 66 private: |
| 67 friend class MediaKeysInitializer; | 67 friend class MediaKeysInitializer; |
| 68 MediaKeys(ExecutionContext*, const String& keySystem, PassOwnPtr<blink::WebC
ontentDecryptionModule>); | 68 MediaKeys(ExecutionContext*, const String& keySystem, PassOwnPtr<blink::WebC
ontentDecryptionModule>); |
| 69 | 69 |
| 70 const String m_keySystem; | 70 const String m_keySystem; |
| 71 OwnPtr<blink::WebContentDecryptionModule> m_cdm; | 71 OwnPtr<blink::WebContentDecryptionModule> m_cdm; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } | 74 } |
| 75 | 75 |
| 76 #endif // MediaKeys_h | 76 #endif // MediaKeys_h |
| OLD | NEW |