Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: ppapi/proxy/interface_list.h

Issue 112343005: Pepper: Finish support for dev channel APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: style nit Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/ppapi_tests.gypi ('k') | ppapi/proxy/interface_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/interface_list.h
diff --git a/ppapi/proxy/interface_list.h b/ppapi/proxy/interface_list.h
index 27728f7f3d4cf6cd713f9395844861c20d529c2e..e229ea5f6fcaf752298a0b6483ec7c79033f2116 100644
--- a/ppapi/proxy/interface_list.h
+++ b/ppapi/proxy/interface_list.h
@@ -16,7 +16,7 @@
namespace ppapi {
namespace proxy {
-class InterfaceList {
+class PPAPI_PROXY_EXPORT InterfaceList {
public:
InterfaceList();
~InterfaceList();
@@ -33,10 +33,8 @@ class InterfaceList {
// plugin process. A real security check is required for all IPC messages.
// This check just allows us to return NULL for interfaces you "shouldn't" be
// using to keep honest plugins honest.
- static PPAPI_PROXY_EXPORT void SetProcessGlobalPermissions(
- const PpapiPermissions& permissions);
- static PPAPI_PROXY_EXPORT void SetSupportsDevChannel(
- bool supports_dev_channel);
+ static void SetProcessGlobalPermissions(const PpapiPermissions& permissions);
+ static void SetSupportsDevChannel(bool supports_dev_channel);
// Looks up the factory function for the given ID. Returns NULL if not
// supported.
@@ -48,14 +46,18 @@ class InterfaceList {
const void* GetInterfaceForPPP(const std::string& name) const;
private:
+ friend class InterfaceListTest;
+
struct InterfaceInfo {
InterfaceInfo()
: iface(NULL),
required_permission(PERMISSION_NONE) {
}
- InterfaceInfo(const void* in_interface, Permission in_perm)
+ InterfaceInfo(const void* in_interface, Permission in_perm,
+ bool in_requires_dev_channel)
dmichael (off chromium) 2013/12/18 18:42:38 Is there a reason this can't be one of the values
: iface(in_interface),
- required_permission(in_perm) {
+ required_permission(in_perm),
+ requires_dev_channel(in_requires_dev_channel) {
}
const void* iface;
@@ -64,6 +66,8 @@ class InterfaceList {
// be checked with the value set via SetProcessGlobalPermissionBits when
// an interface is requested.
Permission required_permission;
+
+ bool requires_dev_channel;
};
typedef std::map<std::string, InterfaceInfo> NameToInterfaceInfoMap;
@@ -73,7 +77,8 @@ class InterfaceList {
// Permissions is the type of permission required to access the corresponding
// interface. Currently this must be just one unique permission (rather than
// a bitfield).
- void AddPPB(const char* name, const void* iface, Permission permission);
+ void AddPPB(const char* name, const void* iface, Permission permission,
+ bool requires_dev_channel);
void AddPPP(const char* name, const void* iface);
PpapiPermissions permissions_;
« no previous file with comments | « ppapi/ppapi_tests.gypi ('k') | ppapi/proxy/interface_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698