OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/component_updater/widevine_cdm_component_installer.h" | 5 #include "chrome/browser/component_updater/widevine_cdm_component_installer.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 base::ASCIIToUTF16(kCdmSupportedCodecsParamName)); | 199 base::ASCIIToUTF16(kCdmSupportedCodecsParamName)); |
200 additional_param_values->push_back(codecs); | 200 additional_param_values->push_back(codecs); |
201 } else { | 201 } else { |
202 DLOG(WARNING) << "Widevine CDM component manifest is missing codecs"; | 202 DLOG(WARNING) << "Widevine CDM component manifest is missing codecs"; |
203 } | 203 } |
204 } | 204 } |
205 | 205 |
206 void RegisterWidevineCdmWithChrome(const base::Version& cdm_version, | 206 void RegisterWidevineCdmWithChrome(const base::Version& cdm_version, |
207 const base::FilePath& adapter_install_path, | 207 const base::FilePath& adapter_install_path, |
208 scoped_ptr<base::DictionaryValue> manifest) { | 208 scoped_ptr<base::DictionaryValue> manifest) { |
209 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 209 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
210 std::vector<base::string16> additional_param_names; | 210 std::vector<base::string16> additional_param_names; |
211 std::vector<base::string16> additional_param_values; | 211 std::vector<base::string16> additional_param_values; |
212 GetAdditionalParams( | 212 GetAdditionalParams( |
213 *manifest, &additional_param_names, &additional_param_values); | 213 *manifest, &additional_param_names, &additional_param_values); |
214 content::PepperPluginInfo plugin_info; | 214 content::PepperPluginInfo plugin_info; |
215 if (!MakeWidevineCdmPluginInfo(cdm_version, | 215 if (!MakeWidevineCdmPluginInfo(cdm_version, |
216 adapter_install_path, | 216 adapter_install_path, |
217 additional_param_names, | 217 additional_param_names, |
218 additional_param_values, | 218 additional_param_values, |
219 &plugin_info)) { | 219 &plugin_info)) { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 scoped_ptr<ComponentInstallerTraits> traits( | 372 scoped_ptr<ComponentInstallerTraits> traits( |
373 new WidevineCdmComponentInstallerTraits); | 373 new WidevineCdmComponentInstallerTraits); |
374 // |cus| will take ownership of |installer| during installer->Register(cus). | 374 // |cus| will take ownership of |installer| during installer->Register(cus). |
375 DefaultComponentInstaller* installer = | 375 DefaultComponentInstaller* installer = |
376 new DefaultComponentInstaller(traits.Pass()); | 376 new DefaultComponentInstaller(traits.Pass()); |
377 installer->Register(cus, base::Closure()); | 377 installer->Register(cus, base::Closure()); |
378 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) | 378 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT) |
379 } | 379 } |
380 | 380 |
381 } // namespace component_updater | 381 } // namespace component_updater |
OLD | NEW |