Handle unknown symbols for media:: method

small implementation so instead of exposing with patch, copy impl

This will be fixed once we remove chromium_src as a thing from e/e
This commit is contained in:
Samuel Attard 2018-07-22 03:30:11 +10:00 committed by Aleksei Kuzmin
parent dc5c49ea7f
commit 0b2b44becf
2 changed files with 42 additions and 4 deletions

View file

@ -26,7 +26,7 @@
#include "content/public/renderer/render_frame.h"
#include "content/public/renderer/render_view.h"
#include "native_mate/dictionary.h"
#include "third_party/blink/platform/weborigin/scheme_registry.h"
#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"
#include "third_party/blink/public/web/blink.h"
#include "third_party/blink/public/web/web_custom_element.h" // NOLINT(build/include_alpha)
#include "third_party/blink/public/web/web_frame_widget.h"

View file

@ -38,6 +38,45 @@
namespace {
// Taken from src/media/cdm/cdm_paths.cc
const char kPlatformSpecific[] = "_platform_specific";
// Name of the component platform in the manifest.
const char kComponentPlatform[] =
#if defined(OS_MACOSX)
"mac";
#elif defined(OS_WIN)
"win";
#elif defined(OS_CHROMEOS)
"cros";
#elif defined(OS_LINUX)
"linux";
#else
"unsupported_platform";
#endif
// Name of the component architecture in the manifest.
const char kComponentArch[] =
#if defined(ARCH_CPU_X86)
"x86";
#elif defined(ARCH_CPU_X86_64)
"x64";
#elif defined(ARCH_CPU_ARMEL)
"arm";
#else
"unsupported_arch";
#endif
// End src/media/cdm/cdm_paths.cc
base::FilePath GetWidevinePath() {
base::FilePath path;
const std::string kPlatformArch =
std::string(kComponentPlatform) + "_" + kComponentArch;
return path.AppendASCII(kWidevineCdmBaseDirectory)
.AppendASCII(kPlatformSpecific)
.AppendASCII(kPlatformArch);
}
// The Pepper Flash plugins are in a directory with this name.
const base::FilePath::CharType kPepperFlashBaseDirectory[] =
FILE_PATH_LITERAL("PepperFlash");
@ -376,9 +415,8 @@ bool PathProvider(int key, base::FilePath* result) {
if (!GetInternalPluginsDirectory(&cur))
return false;
cur =
cur.Append(
media::GetPlatformSpecificDirectory(kWidevineCdmBaseDirectory))
.AppendASCII(base::GetNativeLibraryName(kWidevineCdmLibraryName));
cur.Append(GetWidevinePath())
.AppendASCII(base::GetNativeLibraryName(kWidevineCdmLibraryName));
break;
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
case chrome::FILE_RESOURCES_PACK: