zandobersek@gmail.com | e4e74e9 | 2016-11-10 17:08:41 +0000 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (C) 2016 Metrological Group B.V. |
| 3 | * Copyright (C) 2016 Igalia S.L. |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
| 8 | * |
| 9 | * 1. Redistributions of source code must retain the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer. |
| 11 | * 2. Redistributions in binary form must reproduce the above |
| 12 | * copyright notice, this list of conditions and the following |
| 13 | * disclaimer in the documentation and/or other materials provided |
| 14 | * with the distribution. |
| 15 | * |
| 16 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 19 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 20 | * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | */ |
| 28 | |
| 29 | #include "config.h" |
| 30 | #include "MediaKeySession.h" |
| 31 | |
| 32 | #if ENABLE(ENCRYPTED_MEDIA) |
| 33 | |
| 34 | #include "MediaKeyStatusMap.h" |
| 35 | #include "NotImplemented.h" |
| 36 | |
| 37 | namespace WebCore { |
| 38 | |
| 39 | Ref<MediaKeySession> MediaKeySession::create(ScriptExecutionContext& context) |
| 40 | { |
| 41 | auto session = adoptRef(*new MediaKeySession(context)); |
| 42 | session->suspendIfNeeded(); |
| 43 | return session; |
| 44 | } |
| 45 | |
| 46 | MediaKeySession::MediaKeySession(ScriptExecutionContext& context) |
| 47 | : ActiveDOMObject(&context) |
| 48 | { |
| 49 | } |
| 50 | |
| 51 | MediaKeySession::~MediaKeySession() = default; |
| 52 | |
| 53 | const String& MediaKeySession::sessionId() const |
| 54 | { |
| 55 | notImplemented(); |
| 56 | return emptyString(); |
| 57 | } |
| 58 | |
| 59 | double MediaKeySession::expiration() const |
| 60 | { |
| 61 | notImplemented(); |
| 62 | return 0; |
| 63 | } |
| 64 | |
| 65 | RefPtr<MediaKeyStatusMap> MediaKeySession::keyStatuses() const |
| 66 | { |
| 67 | notImplemented(); |
| 68 | return nullptr; |
| 69 | } |
| 70 | |
| 71 | void MediaKeySession::generateRequest(const String&, const BufferSource&, Ref<DeferredPromise>&&) |
| 72 | { |
| 73 | notImplemented(); |
| 74 | } |
| 75 | |
| 76 | void MediaKeySession::load(const String&, Ref<DeferredPromise>&&) |
| 77 | { |
| 78 | notImplemented(); |
| 79 | } |
| 80 | |
| 81 | void MediaKeySession::update(const BufferSource&, Ref<DeferredPromise>&&) |
| 82 | { |
| 83 | notImplemented(); |
| 84 | } |
| 85 | |
| 86 | void MediaKeySession::close(Ref<DeferredPromise>&&) |
| 87 | { |
| 88 | notImplemented(); |
| 89 | } |
| 90 | |
| 91 | void MediaKeySession::remove(Ref<DeferredPromise>&&) |
| 92 | { |
| 93 | notImplemented(); |
| 94 | } |
| 95 | |
| 96 | bool MediaKeySession::hasPendingActivity() const |
| 97 | { |
| 98 | notImplemented(); |
| 99 | return false; |
| 100 | } |
| 101 | |
| 102 | const char* MediaKeySession::activeDOMObjectName() const |
| 103 | { |
| 104 | notImplemented(); |
| 105 | return "MediaKeySession"; |
| 106 | } |
| 107 | |
| 108 | bool MediaKeySession::canSuspendForDocumentSuspension() const |
| 109 | { |
| 110 | notImplemented(); |
| 111 | return false; |
| 112 | } |
| 113 | |
| 114 | void MediaKeySession::stop() |
| 115 | { |
| 116 | notImplemented(); |
| 117 | } |
| 118 | |
| 119 | } // namespace WebCore |
| 120 | |
| 121 | #endif |