Commit 3ad23e21 authored by noahric@chromium.org's avatar noahric@chromium.org

Add O1D to the list of gtalk ppapi plugins.

O1D is a replacement for O3D. We want to support it on cros as well as
win/mac/lin, so we've written a ppapi implementation of it.

BUG=None


Review URL: https://chromiumcodereview.appspot.com/12733004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192961 0039d316-1c4b-4281-b951-d872f2087c98
parent 3245489e
...@@ -76,6 +76,13 @@ const char kO3DPluginDescription[] = "O3D MIME"; ...@@ -76,6 +76,13 @@ const char kO3DPluginDescription[] = "O3D MIME";
const uint32 kO3DPluginPermissions = ppapi::PERMISSION_PRIVATE | const uint32 kO3DPluginPermissions = ppapi::PERMISSION_PRIVATE |
ppapi::PERMISSION_DEV; ppapi::PERMISSION_DEV;
const char kO1DPluginName[] = "Google Talk Plugin Video Renderer";
const char kO1DPluginMimeType[] ="application/o1d";
const char kO1DPluginExtension[] = "";
const char kO1DPluginDescription[] = "Google Talk Plugin Video Renderer";
const uint32 kO1DPluginPermissions = ppapi::PERMISSION_PRIVATE |
ppapi::PERMISSION_DEV;
const char kGTalkPluginName[] = "Google Talk Plugin"; const char kGTalkPluginName[] = "Google Talk Plugin";
const char kGTalkPluginMimeType[] ="application/googletalk"; const char kGTalkPluginMimeType[] ="application/googletalk";
const char kGTalkPluginExtension[] = ".googletalk"; const char kGTalkPluginExtension[] = ".googletalk";
...@@ -175,6 +182,8 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { ...@@ -175,6 +182,8 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
} }
} }
// TODO(jhorwich|noahric): Remove o3d ppapi code once o3d is replaced
// entirely with o1d.
static bool skip_o3d_file_check = false; static bool skip_o3d_file_check = false;
if (PathService::Get(chrome::FILE_O3D_PLUGIN, &path)) { if (PathService::Get(chrome::FILE_O3D_PLUGIN, &path)) {
if (skip_o3d_file_check || file_util::PathExists(path)) { if (skip_o3d_file_check || file_util::PathExists(path)) {
...@@ -194,6 +203,25 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { ...@@ -194,6 +203,25 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) {
} }
} }
static bool skip_o1d_file_check = false;
if (PathService::Get(chrome::FILE_O1D_PLUGIN, &path)) {
if (skip_o1d_file_check || file_util::PathExists(path)) {
content::PepperPluginInfo o1d;
o1d.path = path;
o1d.name = kO1DPluginName;
o1d.is_out_of_process = true;
o1d.is_sandboxed = false;
o1d.permissions = kO1DPluginPermissions;
webkit::WebPluginMimeType o1d_mime_type(kO1DPluginMimeType,
kO1DPluginExtension,
kO1DPluginDescription);
o1d.mime_types.push_back(o1d_mime_type);
plugins->push_back(o1d);
skip_o1d_file_check = true;
}
}
static bool skip_gtalk_file_check = false; static bool skip_gtalk_file_check = false;
if (PathService::Get(chrome::FILE_GTALK_PLUGIN, &path)) { if (PathService::Get(chrome::FILE_GTALK_PLUGIN, &path)) {
if (skip_gtalk_file_check || file_util::PathExists(path)) { if (skip_gtalk_file_check || file_util::PathExists(path)) {
......
...@@ -76,6 +76,9 @@ const base::FilePath::CharType kInternalNaClHelperBootstrapFileName[] = ...@@ -76,6 +76,9 @@ const base::FilePath::CharType kInternalNaClHelperBootstrapFileName[] =
const base::FilePath::CharType kO3DPluginFileName[] = const base::FilePath::CharType kO3DPluginFileName[] =
FILE_PATH_LITERAL("pepper/libppo3dautoplugin.so"); FILE_PATH_LITERAL("pepper/libppo3dautoplugin.so");
const base::FilePath::CharType kO1DPluginFileName[] =
FILE_PATH_LITERAL("pepper/libppo1d.so");
const base::FilePath::CharType kGTalkPluginFileName[] = const base::FilePath::CharType kGTalkPluginFileName[] =
FILE_PATH_LITERAL("pepper/libppgoogletalk.so"); FILE_PATH_LITERAL("pepper/libppgoogletalk.so");
...@@ -365,6 +368,11 @@ bool PathProvider(int key, base::FilePath* result) { ...@@ -365,6 +368,11 @@ bool PathProvider(int key, base::FilePath* result) {
return false; return false;
cur = cur.Append(kO3DPluginFileName); cur = cur.Append(kO3DPluginFileName);
break; break;
case chrome::FILE_O1D_PLUGIN:
if (!PathService::Get(base::DIR_MODULE, &cur))
return false;
cur = cur.Append(kO1DPluginFileName);
break;
case chrome::FILE_GTALK_PLUGIN: case chrome::FILE_GTALK_PLUGIN:
if (!PathService::Get(base::DIR_MODULE, &cur)) if (!PathService::Get(base::DIR_MODULE, &cur))
return false; return false;
......
...@@ -88,6 +88,7 @@ enum { ...@@ -88,6 +88,7 @@ enum {
DIR_PNACL_COMPONENT, // Full path to the latest PNaCl version DIR_PNACL_COMPONENT, // Full path to the latest PNaCl version
// (subdir of DIR_PNACL_BASE). // (subdir of DIR_PNACL_BASE).
FILE_O3D_PLUGIN, // Full path to the O3D Pepper plugin file. FILE_O3D_PLUGIN, // Full path to the O3D Pepper plugin file.
FILE_O1D_PLUGIN, // Full path to the O1D Pepper plugin file.
FILE_GTALK_PLUGIN, // Full path to the GTalk Pepper plugin file. FILE_GTALK_PLUGIN, // Full path to the GTalk Pepper plugin file.
FILE_WIDEVINE_CDM_PLUGIN, // Full path to the Widevine CDM Pepper plugin FILE_WIDEVINE_CDM_PLUGIN, // Full path to the Widevine CDM Pepper plugin
// file. // file.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment