| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // 2.1 Let the keySystem attribute be keySystem. | 128 // 2.1 Let the keySystem attribute be keySystem. |
| 129 ASSERT(!session->keySystem().isEmpty()); | 129 ASSERT(!session->keySystem().isEmpty()); |
| 130 // FIXME: 2.2 Let the state of the session be CREATED. | 130 // FIXME: 2.2 Let the state of the session be CREATED. |
| 131 | 131 |
| 132 // 3. Add the new object to an internal list of session objects (not needed)
. | 132 // 3. Add the new object to an internal list of session objects (not needed)
. |
| 133 | 133 |
| 134 // 4. Schedule a task to initialize the session, providing type, initData, a
nd the new object. | 134 // 4. Schedule a task to initialize the session, providing type, initData, a
nd the new object. |
| 135 m_pendingInitializeNewSessionData.append(InitializeNewSessionData(session, c
ontentType, initData)); | 135 m_pendingInitializeNewSessionData.append(InitializeNewSessionData(session, c
ontentType, initData)); |
| 136 | 136 |
| 137 if (!m_initializeNewSessionTimer.isActive()) | 137 if (!m_initializeNewSessionTimer.isActive()) |
| 138 m_initializeNewSessionTimer.startOneShot(0); | 138 m_initializeNewSessionTimer.startOneShot(0, FROM_HERE); |
| 139 | 139 |
| 140 // 5. Return the new object to the caller. | 140 // 5. Return the new object to the caller. |
| 141 return session; | 141 return session; |
| 142 } | 142 } |
| 143 | 143 |
| 144 bool MediaKeys::isTypeSupported(const String& keySystem, const String& contentTy
pe) | 144 bool MediaKeys::isTypeSupported(const String& keySystem, const String& contentTy
pe) |
| 145 { | 145 { |
| 146 WTF_LOG(Media, "MediaKeys::isTypeSupported(%s, %s)", keySystem.ascii().data(
), contentType.ascii().data()); | 146 WTF_LOG(Media, "MediaKeys::isTypeSupported(%s, %s)", keySystem.ascii().data(
), contentType.ascii().data()); |
| 147 | 147 |
| 148 // 1. If keySystem is null or an empty string, return false and abort these
steps. | 148 // 1. If keySystem is null or an empty string, return false and abort these
steps. |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 void MediaKeys::contextDestroyed() | 200 void MediaKeys::contextDestroyed() |
| 201 { | 201 { |
| 202 ContextLifecycleObserver::contextDestroyed(); | 202 ContextLifecycleObserver::contextDestroyed(); |
| 203 | 203 |
| 204 // We don't need the CDM anymore. | 204 // We don't need the CDM anymore. |
| 205 m_cdm.clear(); | 205 m_cdm.clear(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 } | 208 } |
| OLD | NEW |