summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/interface_list.cc
diff options
context:
space:
mode:
authorteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 20:42:06 +0000
committerteravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-12 20:42:06 +0000
commit8ddc6b7c44630c67acd9c6b5dceaa1e6cce67431 (patch)
tree6132eb484acd52716648fb444f6790d4934f8d7d /ppapi/proxy/interface_list.cc
parent46a20dedad3c121fa8368641d01962f20b21f79f (diff)
downloadchromium_src-8ddc6b7c44630c67acd9c6b5dceaa1e6cce67431.zip
chromium_src-8ddc6b7c44630c67acd9c6b5dceaa1e6cce67431.tar.gz
chromium_src-8ddc6b7c44630c67acd9c6b5dceaa1e6cce67431.tar.bz2
Pepper: Send dev/canary channel status to plugins.
As part of supporting "dev channel" methods in Pepper APIs, the plugin needs to know whether or not it's running in a channel that supports those methods. This patch plumbs that information through LoadPlugin so it's available by the time get_interface<>() would ever be called. TBR=piman BUG=325403 Review URL: https://codereview.chromium.org/104673003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240398 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/proxy/interface_list.cc')
-rw-r--r--ppapi/proxy/interface_list.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc
index 588d354..8b05f7a 100644
--- a/ppapi/proxy/interface_list.cc
+++ b/ppapi/proxy/interface_list.cc
@@ -165,6 +165,7 @@ InterfaceProxy* ProxyFactory(Dispatcher* dispatcher) {
}
base::LazyInstance<PpapiPermissions> g_process_global_permissions;
+base::LazyInstance<bool> g_supports_dev_channel;
} // namespace
@@ -189,7 +190,6 @@ InterfaceList::InterfaceList() {
#include "ppapi/thunk/interfaces_ppb_private_no_permissions.h"
#include "ppapi/thunk/interfaces_ppb_public_stable.h"
}
-
{
Permission current_required_permission = PERMISSION_DEV;
#include "ppapi/thunk/interfaces_ppb_public_dev.h"
@@ -205,6 +205,8 @@ InterfaceList::InterfaceList() {
#endif // !defined(OS_NACL)
}
+ // TODO(teravest): Add dev channel interfaces here.
+
#undef PROXIED_API
#undef PROXIED_IFACE
@@ -310,6 +312,12 @@ void InterfaceList::SetProcessGlobalPermissions(
g_process_global_permissions.Get() = permissions;
}
+// static
+void InterfaceList::SetSupportsDevChannel(
+ bool supports_dev_channel) {
+ g_supports_dev_channel.Get() = supports_dev_channel;
+}
+
ApiID InterfaceList::GetIDForPPBInterface(const std::string& name) const {
NameToInterfaceInfoMap::const_iterator found =
name_to_browser_info_.find(name);
@@ -340,6 +348,8 @@ const void* InterfaceList::GetInterfaceForPPB(const std::string& name) const {
if (found == name_to_browser_info_.end())
return NULL;
+ // Dev channel checking goes here.
+
if (g_process_global_permissions.Get().HasPermission(
found->second.required_permission))
return found->second.iface;