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 29 matching lines...) Expand all Loading... | |
| 40 #include "modules/encryptedmedia/MediaKeys.h" | 40 #include "modules/encryptedmedia/MediaKeys.h" |
| 41 #include "modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.h" | 41 #include "modules/encryptedmedia/SimpleContentDecryptionModuleResultPromise.h" |
| 42 #include "platform/ContentDecryptionModuleResult.h" | 42 #include "platform/ContentDecryptionModuleResult.h" |
| 43 #include "platform/ContentType.h" | 43 #include "platform/ContentType.h" |
| 44 #include "platform/Logging.h" | 44 #include "platform/Logging.h" |
| 45 #include "platform/MIMETypeRegistry.h" | 45 #include "platform/MIMETypeRegistry.h" |
| 46 #include "platform/Timer.h" | 46 #include "platform/Timer.h" |
| 47 #include "public/platform/WebContentDecryptionModule.h" | 47 #include "public/platform/WebContentDecryptionModule.h" |
| 48 #include "public/platform/WebContentDecryptionModuleException.h" | 48 #include "public/platform/WebContentDecryptionModuleException.h" |
| 49 #include "public/platform/WebContentDecryptionModuleSession.h" | 49 #include "public/platform/WebContentDecryptionModuleSession.h" |
| 50 #include "public/platform/WebEncryptedMediaKeyInformation.h" | |
| 50 #include "public/platform/WebString.h" | 51 #include "public/platform/WebString.h" |
| 51 #include "public/platform/WebURL.h" | 52 #include "public/platform/WebURL.h" |
| 52 #include "wtf/ASCIICType.h" | 53 #include "wtf/ASCIICType.h" |
| 53 #include <cmath> | 54 #include <cmath> |
| 54 #include <limits> | 55 #include <limits> |
| 55 | 56 |
| 56 namespace { | 57 namespace { |
| 57 | 58 |
| 58 // The list of possible values for |sessionType|. | 59 // The list of possible values for |sessionType|. |
| 59 const char kTemporary[] = "temporary"; | 60 const char kTemporary[] = "temporary"; |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 848 | 849 |
| 849 // Resolve the closed promise. | 850 // Resolve the closed promise. |
| 850 m_closedPromise->resolve(ToV8UndefinedGenerator()); | 851 m_closedPromise->resolve(ToV8UndefinedGenerator()); |
| 851 } | 852 } |
| 852 | 853 |
| 853 void MediaKeySession::expirationChanged(double updatedExpiryTimeInMS) | 854 void MediaKeySession::expirationChanged(double updatedExpiryTimeInMS) |
| 854 { | 855 { |
| 855 m_expiration = updatedExpiryTimeInMS; | 856 m_expiration = updatedExpiryTimeInMS; |
| 856 } | 857 } |
| 857 | 858 |
| 859 void MediaKeySession::keysChange(bool hasAdditionalUsableKey, const WebVector<We bEncryptedMediaKeyInformation>& keys) | |
| 860 { | |
| 861 WTF_LOG(Media, "MediaKeySession(%p)::keysChange with %zu keys", this, keys.s ize()); | |
|
ddorwin
2015/01/17 00:34:56
nit: should log the bool too
jrummell
2015/01/20 19:46:34
Done.
| |
| 862 | |
| 863 RefPtrWillBeRawPtr<Event> event = Event::create(EventTypeNames::keyschange); | |
| 864 event->setTarget(this); | |
| 865 m_asyncEventQueue->enqueueEvent(event.release()); | |
| 866 | |
| 867 // FIXME: Attempt to resume playback if |hasAdditionalUsableKey| is true. | |
| 868 // http://crbug.com/413413 | |
| 869 | |
| 870 // FIXME: Copy |keys| or whatever is necessary for keyStatuses. | |
|
ddorwin
2015/01/17 00:34:56
nit: clarify that this is "the keyStatuses attribu
jrummell
2015/01/20 19:46:34
Done.
| |
| 871 // http://crbug.com/432671 | |
| 872 } | |
| 873 | |
| 858 const AtomicString& MediaKeySession::interfaceName() const | 874 const AtomicString& MediaKeySession::interfaceName() const |
| 859 { | 875 { |
| 860 return EventTargetNames::MediaKeySession; | 876 return EventTargetNames::MediaKeySession; |
| 861 } | 877 } |
| 862 | 878 |
| 863 ExecutionContext* MediaKeySession::executionContext() const | 879 ExecutionContext* MediaKeySession::executionContext() const |
| 864 { | 880 { |
| 865 return ActiveDOMObject::executionContext(); | 881 return ActiveDOMObject::executionContext(); |
| 866 } | 882 } |
| 867 | 883 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 897 { | 913 { |
| 898 visitor->trace(m_asyncEventQueue); | 914 visitor->trace(m_asyncEventQueue); |
| 899 visitor->trace(m_pendingActions); | 915 visitor->trace(m_pendingActions); |
| 900 visitor->trace(m_mediaKeys); | 916 visitor->trace(m_mediaKeys); |
| 901 visitor->trace(m_closedPromise); | 917 visitor->trace(m_closedPromise); |
| 902 RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession>::trace( visitor); | 918 RefCountedGarbageCollectedEventTargetWithInlineData<MediaKeySession>::trace( visitor); |
| 903 ActiveDOMObject::trace(visitor); | 919 ActiveDOMObject::trace(visitor); |
| 904 } | 920 } |
| 905 | 921 |
| 906 } // namespace blink | 922 } // namespace blink |
| OLD | NEW |