Home | History | Annotate | Download | only in web
      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 "web/MediaKeysClientImpl.h"
      7 
      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"
     13 
     14 using namespace WebCore;
     15 
     16 namespace blink {
     17 
     18 MediaKeysClientImpl::MediaKeysClientImpl()
     19 {
     20 }
     21 
     22 PassOwnPtr<WebContentDecryptionModule> MediaKeysClientImpl::createContentDecryptionModule(WebCore::ExecutionContext* executionContext, const String& keySystem)
     23 {
     24     Document* document = toDocument(executionContext);
     25     WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame());
     26     WebSecurityOrigin securityOrigin(executionContext->securityOrigin());
     27     return adoptPtr(webFrame->client()->createContentDecryptionModule(webFrame, securityOrigin, keySystem));
     28 }
     29 
     30 } // namespace blink
     31