OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #include "config.h" |
| 6 #include "MediaKeysClientImpl.h" |
| 7 |
| 8 #include "WebFrameClient.h" |
| 9 #include "WebFrameImpl.h" |
| 10 #include "core/dom/Document.h" |
| 11 #include "core/dom/ExecutionContext.h" |
| 12 |
| 13 using namespace WebCore; |
| 14 |
| 15 namespace blink { |
| 16 |
| 17 PassOwnPtr<MediaKeysClientImpl> MediaKeysClientImpl::create() |
| 18 { |
| 19 return adoptPtr(new MediaKeysClientImpl()); |
| 20 } |
| 21 |
| 22 MediaKeysClientImpl::MediaKeysClientImpl() |
| 23 { |
| 24 } |
| 25 |
| 26 WebContentDecryptionModule* MediaKeysClientImpl::createContentDecryptionModule(W
ebCore::ExecutionContext* executionContext, const String& keySystem) |
| 27 { |
| 28 ASSERT(executionContext->isDocument()); |
| 29 Document* document = toDocument(executionContext); |
| 30 WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame()); |
| 31 WebSecurityOrigin securityOrigin(executionContext->securityOrigin()); |
| 32 return webFrame->client()->createContentDecryptionModule(webFrame, securityO
rigin, keySystem); |
| 33 } |
| 34 |
| 35 } // namespace blink |
OLD | NEW |