OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "content/public/common/content_client.h" | 8 #include "content/public/common/content_client.h" |
9 #include "content/public/common/eme_constants.h" | 9 #include "content/public/common/eme_constants.h" |
10 #include "content/public/renderer/content_renderer_client.h" | 10 #include "content/public/renderer/content_renderer_client.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 AddContainerMask("audio/foo", TEST_CODEC_FOO_AUDIO_ALL); | 86 AddContainerMask("audio/foo", TEST_CODEC_FOO_AUDIO_ALL); |
87 AddContainerMask("video/foo", TEST_CODEC_FOO_ALL); | 87 AddContainerMask("video/foo", TEST_CODEC_FOO_ALL); |
88 AddCodecMask("fooaudio", TEST_CODEC_FOO_AUDIO); | 88 AddCodecMask("fooaudio", TEST_CODEC_FOO_AUDIO); |
89 AddCodecMask("foovideo", TEST_CODEC_FOO_VIDEO); | 89 AddCodecMask("foovideo", TEST_CODEC_FOO_VIDEO); |
90 | 90 |
91 is_test_masks_added = true; | 91 is_test_masks_added = true; |
92 } | 92 } |
93 | 93 |
94 class TestContentRendererClient : public ContentRendererClient { | 94 class TestContentRendererClient : public ContentRendererClient { |
95 virtual void AddKeySystems( | 95 void AddKeySystems(std::vector<content::KeySystemInfo>* key_systems) override; |
96 std::vector<content::KeySystemInfo>* key_systems) override; | |
97 }; | 96 }; |
98 | 97 |
99 void TestContentRendererClient::AddKeySystems( | 98 void TestContentRendererClient::AddKeySystems( |
100 std::vector<content::KeySystemInfo>* key_systems) { | 99 std::vector<content::KeySystemInfo>* key_systems) { |
101 KeySystemInfo aes(kUsesAes); | 100 KeySystemInfo aes(kUsesAes); |
102 aes.supported_codecs = EME_CODEC_WEBM_ALL; | 101 aes.supported_codecs = EME_CODEC_WEBM_ALL; |
103 aes.supported_codecs |= TEST_CODEC_FOO_ALL; | 102 aes.supported_codecs |= TEST_CODEC_FOO_ALL; |
104 aes.supported_init_data_types = EME_INIT_DATA_TYPE_WEBM; | 103 aes.supported_init_data_types = EME_INIT_DATA_TYPE_WEBM; |
105 aes.use_aes_decryptor = true; | 104 aes.use_aes_decryptor = true; |
106 key_systems->push_back(aes); | 105 key_systems->push_back(aes); |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 | 640 |
642 #if defined(WIDEVINE_CDM_AVAILABLE) | 641 #if defined(WIDEVINE_CDM_AVAILABLE) |
643 const char* const kTestWidevineUmaName = "Widevine"; | 642 const char* const kTestWidevineUmaName = "Widevine"; |
644 #else | 643 #else |
645 const char* const kTestWidevineUmaName = "Unknown"; | 644 const char* const kTestWidevineUmaName = "Unknown"; |
646 #endif | 645 #endif |
647 EXPECT_EQ(kTestWidevineUmaName, KeySystemNameForUMA("com.widevine.alpha")); | 646 EXPECT_EQ(kTestWidevineUmaName, KeySystemNameForUMA("com.widevine.alpha")); |
648 } | 647 } |
649 | 648 |
650 } // namespace content | 649 } // namespace content |
OLD | NEW |