Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(751)

Side by Side Diff: chrome/browser/media/pepper_cdm_test_helper.h

Issue 2020573002: media: Check Widevine CDM registration and availability. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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). 16 // Base path for Clear Key CDM (relative to the chrome executable).
17 extern const char kClearKeyCdmBaseDirectory[]; 17 extern const char kClearKeyCdmBaseDirectory[];
18 18
19 // Platform-specific filename relative to kClearKeyCdmBaseDirectory. 19 // Platform-specific filename relative to kClearKeyCdmBaseDirectory.
20 extern const char kClearKeyCdmAdapterFileName[]; 20 extern const char kClearKeyCdmAdapterFileName[];
21 21
22 // Display name for Clear Key CDM. 22 // Display name for Clear Key CDM.
23 extern const char kClearKeyCdmDisplayName[]; 23 extern const char kClearKeyCdmDisplayName[];
24 24
25 // Pepper type for Clear Key CDM. 25 // Pepper type for Clear Key CDM.
26 extern const char kClearKeyCdmPepperMimeType[]; 26 extern const char kClearKeyCdmPepperMimeType[];
27 27
28 // Returns the path a pepper CDM adapter.
29 base::FilePath GetPepperCdmPath(const std::string& adapter_base_dir,
30 const std::string& adapter_file_name);
31
28 // Builds the string to pass to kRegisterPepperPlugins for a single 32 // Builds the string to pass to kRegisterPepperPlugins for a single
29 // CDM using the provided parameters and a dummy version. 33 // CDM using the provided parameters and a dummy version.
30 // Multiple results may be passed to kRegisterPepperPlugins, separated by ",". 34 // Multiple results may be passed to kRegisterPepperPlugins, separated by ",".
31 // The CDM adapter should be located in DIR_MODULE. 35 // The CDM adapter should be located in DIR_MODULE.
32 base::FilePath::StringType BuildPepperCdmRegistration( 36 base::FilePath::StringType BuildPepperCdmRegistration(
33 const std::string& adapter_base_dir, 37 const std::string& adapter_base_dir,
34 const std::string& adapter_file_name, 38 const std::string& adapter_file_name,
35 const std::string& display_name, 39 const std::string& display_name,
36 const std::string& mime_type, 40 const std::string& mime_type,
37 bool expect_adapter_exists = true); 41 bool expect_adapter_exists = true);
38 42
39 // Registers pepper CDM in |command_line|. 43 // Registers pepper CDM in |command_line|.
40 void RegisterPepperCdm(base::CommandLine* command_line, 44 void RegisterPepperCdm(base::CommandLine* command_line,
41 const std::string& adapter_base_dir, 45 const std::string& adapter_base_dir,
42 const std::string& adapter_file_name, 46 const std::string& adapter_file_name,
43 const std::string& display_name, 47 const std::string& display_name,
44 const std::string& mime_type, 48 const std::string& mime_type,
45 bool expect_adapter_exists = true); 49 bool expect_adapter_exists = true);
46 50
51 // Returns whether a pepper CDM with |mime_type| is registered.
52 bool IsPepperCdmRegistered(const std::string& mime_type);
53
47 #endif // CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_ 54 #endif // CHROME_BROWSER_MEDIA_PEPPER_CDM_TEST_HELPER_H_
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/content_settings_browsertest.cc ('k') | chrome/browser/media/pepper_cdm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698