Disable flaky testHTTPResponseTimelineRecorder on Mac
[chromium-blink-merge.git] / chromecast / browser / media / cast_browser_cdm_factory.cc
blob6b6dfffb469c89f7c3a48b886106b6897df19e86
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.
5 #include "chromecast/browser/media/cast_browser_cdm_factory.h"
7 namespace chromecast {
8 namespace media {
10 scoped_ptr< ::media::BrowserCdm> CastBrowserCdmFactory::CreateBrowserCdm(
11 const std::string& key_system_name,
12 const ::media::SessionMessageCB& session_message_cb,
13 const ::media::SessionClosedCB& session_closed_cb,
14 const ::media::SessionErrorCB& session_error_cb,
15 const ::media::SessionKeysChangeCB& session_keys_change_cb,
16 const ::media::SessionExpirationUpdateCB& session_expiration_update_cb) {
17 CastKeySystem key_system(GetKeySystemByName(key_system_name));
19 // TODO(gunsch): handle ClearKey decryption. See crbug.com/441957
21 scoped_ptr< ::media::BrowserCdm> platform_cdm(
22 CreatePlatformBrowserCdm(key_system,
23 session_message_cb,
24 session_closed_cb,
25 session_error_cb,
26 session_keys_change_cb,
27 session_expiration_update_cb));
28 if (platform_cdm) {
29 return platform_cdm.Pass();
32 LOG(INFO) << "No matching key system found.";
33 return scoped_ptr< ::media::BrowserCdm>();
36 } // namespace media
37 } // namespace chromecast