summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/WebKit/Source/web/MediaKeysClientImpl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/WebKit/Source/web/MediaKeysClientImpl.cpp')
-rw-r--r--chromium/third_party/WebKit/Source/web/MediaKeysClientImpl.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/chromium/third_party/WebKit/Source/web/MediaKeysClientImpl.cpp b/chromium/third_party/WebKit/Source/web/MediaKeysClientImpl.cpp
new file mode 100644
index 00000000000..d78da372c37
--- /dev/null
+++ b/chromium/third_party/WebKit/Source/web/MediaKeysClientImpl.cpp
@@ -0,0 +1,30 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "config.h"
+#include "web/MediaKeysClientImpl.h"
+
+#include "core/dom/Document.h"
+#include "core/dom/ExecutionContext.h"
+#include "public/platform/WebContentDecryptionModule.h"
+#include "public/web/WebFrameClient.h"
+#include "web/WebLocalFrameImpl.h"
+
+using namespace WebCore;
+
+namespace blink {
+
+MediaKeysClientImpl::MediaKeysClientImpl()
+{
+}
+
+PassOwnPtr<WebContentDecryptionModule> MediaKeysClientImpl::createContentDecryptionModule(WebCore::ExecutionContext* executionContext, const String& keySystem)
+{
+ Document* document = toDocument(executionContext);
+ WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(document->frame());
+ WebSecurityOrigin securityOrigin(executionContext->securityOrigin());
+ return adoptPtr(webFrame->client()->createContentDecryptionModule(webFrame, securityOrigin, keySystem));
+}
+
+} // namespace blink