blob: e5f1177466622c89aaca9522c5d17e31dcbb9aba [file] [log] [blame]
zandobersek@gmail.come4e74e92016-11-10 17:08:41 +00001/*
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
37namespace WebCore {
38
39Ref<MediaKeySession> MediaKeySession::create(ScriptExecutionContext& context)
40{
41 auto session = adoptRef(*new MediaKeySession(context));
42 session->suspendIfNeeded();
43 return session;
44}
45
46MediaKeySession::MediaKeySession(ScriptExecutionContext& context)
47 : ActiveDOMObject(&context)
48{
49}
50
51MediaKeySession::~MediaKeySession() = default;
52
53const String& MediaKeySession::sessionId() const
54{
55 notImplemented();
56 return emptyString();
57}
58
59double MediaKeySession::expiration() const
60{
61 notImplemented();
62 return 0;
63}
64
65RefPtr<MediaKeyStatusMap> MediaKeySession::keyStatuses() const
66{
67 notImplemented();
68 return nullptr;
69}
70
71void MediaKeySession::generateRequest(const String&, const BufferSource&, Ref<DeferredPromise>&&)
72{
73 notImplemented();
74}
75
76void MediaKeySession::load(const String&, Ref<DeferredPromise>&&)
77{
78 notImplemented();
79}
80
81void MediaKeySession::update(const BufferSource&, Ref<DeferredPromise>&&)
82{
83 notImplemented();
84}
85
86void MediaKeySession::close(Ref<DeferredPromise>&&)
87{
88 notImplemented();
89}
90
91void MediaKeySession::remove(Ref<DeferredPromise>&&)
92{
93 notImplemented();
94}
95
96bool MediaKeySession::hasPendingActivity() const
97{
98 notImplemented();
99 return false;
100}
101
102const char* MediaKeySession::activeDOMObjectName() const
103{
104 notImplemented();
105 return "MediaKeySession";
106}
107
108bool MediaKeySession::canSuspendForDocumentSuspension() const
109{
110 notImplemented();
111 return false;
112}
113
114void MediaKeySession::stop()
115{
116 notImplemented();
117}
118
119} // namespace WebCore
120
121#endif