cef/patch/patches/chrome_pepper_flash_1586.patch
Marshall Greenblatt 2fe1d33239 Add Pepper Flash plugin support (issue #1586).
A system-wide installation of the Pepper Flash plugin is available from Adobe
for Windows and Mac OS X platforms as a separate download. To enable automatic
detection and loading of the system-wide installation pass the
`--enable-system-flash` command-line flag.

The Pepper Flash plugin can also be loaded by specifying the file path and
version via the `--ppapi-flash-path=<path> --ppapi-flash-version=<version>`
command-line flags. The version can be identified by viewing the
manifest.json file in the same directory as the Pepper Flash plugin library.
2015-03-26 17:00:30 -04:00

28 lines
968 B
Diff

diff --git pepper_flash.cc pepper_flash.cc
index b21d4d1..11fac76 100644
--- pepper_flash.cc
+++ pepper_flash.cc
@@ -117,6 +117,14 @@ bool CheckPepperFlashManifest(const base::DictionaryValue& manifest,
if (os != kPepperFlashOperatingSystem)
return false;
+#if defined(OS_MACOSX)
+ // On Mac newer versions of the plugin are a universal binary and use "mac"
+ // as the value.
+ std::string arch;
+ manifest.GetStringASCII("x-ppapi-arch", &arch);
+ if (arch != kPepperFlashArch && arch != kPepperFlashOperatingSystem)
+ return false;
+#else
// On Win64, PepperFlash manifests have "ia32" instead of "x64" so skip the
// architecture check. TODO(wfh): remove this when crbug.com/458894 is fixed.
#if !defined(OS_WIN) || !defined(ARCH_CPU_X86_64)
@@ -125,6 +133,7 @@ bool CheckPepperFlashManifest(const base::DictionaryValue& manifest,
if (arch != kPepperFlashArch)
return false;
#endif
+#endif
*version_out = version;
return true;