OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ |
6 #define CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ | 6 #define CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 | 11 |
12 namespace base { | 12 namespace base { |
13 class CommandLine; | 13 class CommandLine; |
14 } | 14 } |
15 | 15 |
| 16 // Base path for Clear Key CDM (relative to the chrome executable). |
| 17 extern const char kClearKeyCdmBaseDirectory[]; |
| 18 |
| 19 // Platform-specific filename relative to kClearKeyCdmBaseDirectory. |
| 20 extern const char kClearKeyCdmAdapterFileName[]; |
| 21 |
16 // Display name for Clear Key CDM. | 22 // Display name for Clear Key CDM. |
17 extern const char kClearKeyCdmDisplayName[]; | 23 extern const char kClearKeyCdmDisplayName[]; |
18 | 24 |
19 // Platform-specific filename relative to kClearKeyCdmBaseDirectory. | |
20 extern const char kClearKeyCdmAdapterFileName[]; | |
21 | |
22 // Pepper type for Clear Key CDM. | 25 // Pepper type for Clear Key CDM. |
23 extern const char kClearKeyCdmPepperMimeType[]; | 26 extern const char kClearKeyCdmPepperMimeType[]; |
24 | 27 |
25 // Builds the string to pass to kRegisterPepperPlugins for a single | 28 // Builds the string to pass to kRegisterPepperPlugins for a single |
26 // CDM using the provided parameters and a dummy version. | 29 // CDM using the provided parameters and a dummy version. |
27 // Multiple results may be passed to kRegisterPepperPlugins, separated by ",". | 30 // Multiple results may be passed to kRegisterPepperPlugins, separated by ",". |
28 // The CDM adapter should be located in DIR_MODULE. | 31 // The CDM adapter should be located in DIR_MODULE. |
29 base::FilePath::StringType BuildPepperCdmRegistration( | 32 base::FilePath::StringType BuildPepperCdmRegistration( |
| 33 const std::string& adapter_base_dir, |
30 const std::string& adapter_file_name, | 34 const std::string& adapter_file_name, |
31 const std::string& display_name, | 35 const std::string& display_name, |
32 const std::string& mime_type, | 36 const std::string& mime_type, |
33 bool expect_adapter_exists = true); | 37 bool expect_adapter_exists = true); |
34 | 38 |
35 // Registers pepper CDM in |command_line|. | 39 // Registers pepper CDM in |command_line|. |
36 void RegisterPepperCdm(base::CommandLine* command_line, | 40 void RegisterPepperCdm(base::CommandLine* command_line, |
| 41 const std::string& adapter_base_dir, |
37 const std::string& adapter_file_name, | 42 const std::string& adapter_file_name, |
38 const std::string& display_name, | 43 const std::string& display_name, |
39 const std::string& mime_type, | 44 const std::string& mime_type, |
40 bool expect_adapter_exists = true); | 45 bool expect_adapter_exists = true); |
41 | 46 |
42 #endif // CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ | 47 #endif // CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ |
OLD | NEW |