Chromium Code Reviews| Index: chrome/browser/media/pepper_cdm_test_helper.h |
| diff --git a/chrome/browser/media/pepper_cdm_test_helper.h b/chrome/browser/media/pepper_cdm_test_helper.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..78d93afafb91e8ed9a55c5e2d229aae12decd5bd |
| --- /dev/null |
| +++ b/chrome/browser/media/pepper_cdm_test_helper.h |
| @@ -0,0 +1,44 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ |
| +#define CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ |
| + |
| +#include <string> |
| + |
| +#include "base/files/file_path.h" |
| + |
| +#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
|
| +namespace base { |
| +class CommandLine; |
| +} |
| + |
| +// Base path for Clear Key CDM (relative to the chrome executable). |
| +extern const char kClearKeyCdmBaseDirectory[]; |
| + |
| +// Platform-specific filename relative to kClearKeyCdmBaseDirectory. |
| +extern const char kClearKeyCdmAdapterFileName[]; |
| + |
| +// Pepper type for Clear Key CDM. |
| +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.
|
| + |
| +// Builds the string to pass to kRegisterPepperPlugins for a single |
| +// cdm using the provided parameters and a dummy version. |
|
ddorwin
2016/05/16 21:37:55
nit: CDM
|
| +// 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.
|
| +// The CDM adapter should be located in |adapter_base_dir| in DIR_MODULE. |
| +base::FilePath::StringType BuildPepperCdmRegistration( |
| + const std::string& adapter_base_dir, |
| + const std::string& adapter_file_name, |
| + const std::string& mime_type, |
| + bool expect_adapter_exists = true); |
| + |
| +// Registers pepper CDM in |command_line|. |
| +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.
|
| + const std::string& adapter_base_dir, |
| + const std::string& adapter_file_name, |
| + const std::string& mime_type, |
| + bool expect_adapter_exists = true); |
| +#endif // defined(ENABLE_PEPPER_CDMS) |
| + |
| +#endif // CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ |