Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / Source / web / MediaKeysClientImpl.cpp
blob865b31741eddefdec79cf01a797791fd5d6f69e5
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.
5 #include "config.h"
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"
14 namespace blink {
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();
27 } // namespace blink