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 "modules/encryptedmedia/MediaKeysController.h" 7 8#include "modules/encryptedmedia/MediaKeysClient.h" 9#include "public/platform/WebContentDecryptionModule.h" 10 11namespace blink { 12 13const char* MediaKeysController::supplementName() 14{ 15 return "MediaKeysController"; 16} 17 18MediaKeysController::MediaKeysController(MediaKeysClient* client) 19 : m_client(client) 20{ 21} 22 23PassOwnPtr<WebContentDecryptionModule> MediaKeysController::createContentDecryptionModule(ExecutionContext* context, const String& keySystem) 24{ 25 return m_client->createContentDecryptionModule(context, keySystem); 26} 27 28 29void MediaKeysController::provideMediaKeysTo(Page& page, MediaKeysClient* client) 30{ 31 MediaKeysController::provideTo(page, supplementName(), adoptPtrWillBeNoop(new MediaKeysController(client))); 32} 33 34} // namespace blink 35 36