1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
6 #include "web/MediaKeysClientImpl.h"
8 #include "core/dom/Document.h"
9 #include "core/dom/ExecutionContext.h"
10 #include "public/platform/WebContentDecryptionModule.h"
11 #include "public/web/WebFrameClient.h"
12 #include "web/WebLocalFrameImpl.h"
16 MediaKeysClientImpl::MediaKeysClientImpl()
20 WebEncryptedMediaClient
* MediaKeysClientImpl::encryptedMediaClient(ExecutionContext
* executionContext
)
22 Document
* document
= toDocument(executionContext
);
23 WebLocalFrameImpl
* webFrame
= WebLocalFrameImpl::fromFrame(document
->frame());
24 return webFrame
->client()->encryptedMediaClient();