Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ | |
| 6 #define CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/files/file_path.h" | |
| 11 | |
| 12 #if defined(ENABLE_PEPPER_CDMS) | |
|
ddorwin
2016/05/16 21:37:55
nit: Should we ifdef the includes too?
xhwang
2016/05/18 00:38:29
Not necessary now since we only use this file when
| |
| 13 namespace base { | |
| 14 class CommandLine; | |
| 15 } | |
| 16 | |
| 17 // Base path for Clear Key CDM (relative to the chrome executable). | |
| 18 extern const char kClearKeyCdmBaseDirectory[]; | |
| 19 | |
| 20 // Platform-specific filename relative to kClearKeyCdmBaseDirectory. | |
| 21 extern const char kClearKeyCdmAdapterFileName[]; | |
| 22 | |
| 23 // Pepper type for Clear Key CDM. | |
| 24 extern const char kClearKeyCdmPluginMimeType[]; | |
|
ddorwin
2016/05/16 21:37:55
Use "Pepper" or just drop the word.
xhwang
2016/05/18 00:38:29
Done.
| |
| 25 | |
| 26 // Builds the string to pass to kRegisterPepperPlugins for a single | |
| 27 // cdm using the provided parameters and a dummy version. | |
|
ddorwin
2016/05/16 21:37:55
nit: CDM
| |
| 28 // Multiple results may be passed to kRegisterPepperPlugins, separated by ",". | |
|
ddorwin
2016/05/16 21:37:55
Return values from multiple calls may be passed to
xhwang
2016/05/18 00:38:29
Done.
| |
| 29 // The CDM adapter should be located in |adapter_base_dir| in DIR_MODULE. | |
| 30 base::FilePath::StringType BuildPepperCdmRegistration( | |
| 31 const std::string& adapter_base_dir, | |
| 32 const std::string& adapter_file_name, | |
| 33 const std::string& mime_type, | |
| 34 bool expect_adapter_exists = true); | |
| 35 | |
| 36 // Registers pepper CDM in |command_line|. | |
| 37 void RegisterPepperCdm(base::CommandLine* command_line, | |
|
ddorwin
2016/05/16 21:37:55
// May only be called once per test (|command_line
xhwang
2016/05/18 00:38:29
Acknowledged.
| |
| 38 const std::string& adapter_base_dir, | |
| 39 const std::string& adapter_file_name, | |
| 40 const std::string& mime_type, | |
| 41 bool expect_adapter_exists = true); | |
| 42 #endif // defined(ENABLE_PEPPER_CDMS) | |
| 43 | |
| 44 #endif // CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ | |
| OLD | NEW |