OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/content_settings/cookie_settings.h" | 9 #include "chrome/browser/content_settings/cookie_settings.h" |
10 #include "chrome/browser/content_settings/host_content_settings_map.h" | 10 #include "chrome/browser/content_settings/host_content_settings_map.h" |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 const char kLibraryName[] = "clearkeycdmadapter.plugin"; | 489 const char kLibraryName[] = "clearkeycdmadapter.plugin"; |
490 #elif defined(OS_POSIX) | 490 #elif defined(OS_POSIX) |
491 const char kLibraryName[] = "libclearkeycdmadapter.so"; | 491 const char kLibraryName[] = "libclearkeycdmadapter.so"; |
492 #endif // defined(OS_MACOSX) | 492 #endif // defined(OS_MACOSX) |
493 #endif // defined(OS_WIN) | 493 #endif // defined(OS_WIN) |
494 | 494 |
495 // Append the switch to register the External Clear Key CDM. | 495 // Append the switch to register the External Clear Key CDM. |
496 base::FilePath plugin_dir; | 496 base::FilePath plugin_dir; |
497 EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &plugin_dir)); | 497 EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &plugin_dir)); |
498 base::FilePath plugin_lib = plugin_dir.AppendASCII(kLibraryName); | 498 base::FilePath plugin_lib = plugin_dir.AppendASCII(kLibraryName); |
499 EXPECT_TRUE(file_util::PathExists(plugin_lib)); | 499 EXPECT_TRUE(base::PathExists(plugin_lib)); |
500 base::FilePath::StringType pepper_plugin = plugin_lib.value(); | 500 base::FilePath::StringType pepper_plugin = plugin_lib.value(); |
501 pepper_plugin.append(FILE_PATH_LITERAL( | 501 pepper_plugin.append(FILE_PATH_LITERAL( |
502 "#Clear Key CDM#Clear Key CDM 0.1.0.0#0.1.0.0;")); | 502 "#Clear Key CDM#Clear Key CDM 0.1.0.0#0.1.0.0;")); |
503 pepper_plugin.append(external_clear_key_mime_type); | 503 pepper_plugin.append(external_clear_key_mime_type); |
504 command_line->AppendSwitchNative(switches::kRegisterPepperPlugins, | 504 command_line->AppendSwitchNative(switches::kRegisterPepperPlugins, |
505 pepper_plugin); | 505 pepper_plugin); |
506 #endif // defined(ENABLE_PEPPER_CDMS) | 506 #endif // defined(ENABLE_PEPPER_CDMS) |
507 | 507 |
508 #if !defined(DISABLE_NACL) | 508 #if !defined(DISABLE_NACL) |
509 // Ensure NaCl can run. | 509 // Ensure NaCl can run. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
604 RunJavaScriptBlockedTest("load_widevine_no_js.html", true); | 604 RunJavaScriptBlockedTest("load_widevine_no_js.html", true); |
605 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 605 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
606 #endif // defined(ENABLE_PEPPER_CDMS) | 606 #endif // defined(ENABLE_PEPPER_CDMS) |
607 | 607 |
608 #if !defined(DISABLE_NACL) | 608 #if !defined(DISABLE_NACL) |
609 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); | 609 RunJavaScriptBlockedTest("load_nacl_no_js.html", true); |
610 #endif // !defined(DISABLE_NACL) | 610 #endif // !defined(DISABLE_NACL) |
611 } | 611 } |
612 | 612 |
613 #endif // defined(ENABLE_PLUGINS) | 613 #endif // defined(ENABLE_PLUGINS) |
OLD | NEW |