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