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:
parent
dc5c49ea7f
commit
0b2b44becf
2 changed files with 42 additions and 4 deletions
|
@ -26,7 +26,7 @@
|
||||||
#include "content/public/renderer/render_frame.h"
|
#include "content/public/renderer/render_frame.h"
|
||||||
#include "content/public/renderer/render_view.h"
|
#include "content/public/renderer/render_view.h"
|
||||||
#include "native_mate/dictionary.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/blink.h"
|
||||||
#include "third_party/blink/public/web/web_custom_element.h" // NOLINT(build/include_alpha)
|
#include "third_party/blink/public/web/web_custom_element.h" // NOLINT(build/include_alpha)
|
||||||
#include "third_party/blink/public/web/web_frame_widget.h"
|
#include "third_party/blink/public/web/web_frame_widget.h"
|
||||||
|
|
|
@ -38,6 +38,45 @@
|
||||||
|
|
||||||
namespace {
|
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.
|
// The Pepper Flash plugins are in a directory with this name.
|
||||||
const base::FilePath::CharType kPepperFlashBaseDirectory[] =
|
const base::FilePath::CharType kPepperFlashBaseDirectory[] =
|
||||||
FILE_PATH_LITERAL("PepperFlash");
|
FILE_PATH_LITERAL("PepperFlash");
|
||||||
|
@ -376,8 +415,7 @@ bool PathProvider(int key, base::FilePath* result) {
|
||||||
if (!GetInternalPluginsDirectory(&cur))
|
if (!GetInternalPluginsDirectory(&cur))
|
||||||
return false;
|
return false;
|
||||||
cur =
|
cur =
|
||||||
cur.Append(
|
cur.Append(GetWidevinePath())
|
||||||
media::GetPlatformSpecificDirectory(kWidevineCdmBaseDirectory))
|
|
||||||
.AppendASCII(base::GetNativeLibraryName(kWidevineCdmLibraryName));
|
.AppendASCII(base::GetNativeLibraryName(kWidevineCdmLibraryName));
|
||||||
break;
|
break;
|
||||||
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
#endif // defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_LIBRARY_CDMS)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue