summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/proxy/interface_list.cc19
-rw-r--r--ppapi/proxy/interface_list.h1
-rw-r--r--ppapi/proxy/ppb_testing_proxy.cc15
-rw-r--r--ppapi/proxy/ppb_testing_proxy.h2
-rw-r--r--ppapi/proxy/ppb_var_deprecated_proxy.cc16
-rw-r--r--ppapi/proxy/ppb_var_deprecated_proxy.h2
6 files changed, 17 insertions, 38 deletions
diff --git a/ppapi/proxy/interface_list.cc b/ppapi/proxy/interface_list.cc
index f609855..ed634db 100644
--- a/ppapi/proxy/interface_list.cc
+++ b/ppapi/proxy/interface_list.cc
@@ -248,8 +248,14 @@ InterfaceList::InterfaceList() {
// PPB (browser) interfaces.
// Do not add more stuff here, they should be added to interface_list*.h
// TODO(brettw) remove these.
- AddPPB(PPB_Instance_Proxy::GetInfoPrivate(), PERMISSION_PRIVATE);
- AddPPB(PPB_Var_Deprecated_Proxy::GetInfo(), PERMISSION_DEV);
+ AddProxy(API_ID_PPB_INSTANCE_PRIVATE, &ProxyFactory<PPB_Instance_Proxy>);
+ AddPPB(PPB_INSTANCE_PRIVATE_INTERFACE_0_1, API_ID_PPB_INSTANCE_PRIVATE,
+ thunk::GetPPB_Instance_Private_0_1_Thunk(),
+ PERMISSION_PRIVATE);
+
+ AddProxy(API_ID_PPB_VAR_DEPRECATED, &ProxyFactory<PPB_Var_Deprecated_Proxy>);
+ AddPPB(PPB_VAR_DEPRECATED_INTERFACE, API_ID_PPB_VAR_DEPRECATED,
+ PPB_Var_Deprecated_Proxy::GetProxyInterface(), PERMISSION_DEV);
// TODO(tomfinegan): Figure out where to put these once we refactor things
// to load the PPP interface struct from the PPB interface.
@@ -259,7 +265,9 @@ InterfaceList::InterfaceList() {
API_ID_PPP_CONTENT_DECRYPTOR_PRIVATE,
PPP_ContentDecryptor_Private_Proxy::GetProxyInterface());
#endif
- AddPPB(PPB_Testing_Proxy::GetInfo(), PERMISSION_TESTING);
+ AddProxy(API_ID_PPB_TESTING, &ProxyFactory<PPB_Testing_Proxy>);
+ AddPPB(PPB_TESTING_PRIVATE_INTERFACE, API_ID_PPB_TESTING,
+ PPB_Testing_Proxy::GetProxyInterface(), PERMISSION_TESTING);
// PPP (plugin) interfaces.
// TODO(brettw) move these to interface_list*.h
@@ -377,11 +385,6 @@ void InterfaceList::AddPPP(const char* name,
name_to_plugin_info_[name] = InterfaceInfo(id, iface, PERMISSION_NONE);
}
-void InterfaceList::AddPPB(const InterfaceProxy::Info* info, Permission perm) {
- AddProxy(info->id, info->create_proxy);
- AddPPB(info->name, info->id, info->interface_ptr, perm);
-}
-
void InterfaceList::AddPPP(const InterfaceProxy::Info* info) {
AddProxy(info->id, info->create_proxy);
AddPPP(info->name, info->id, info->interface_ptr);
diff --git a/ppapi/proxy/interface_list.h b/ppapi/proxy/interface_list.h
index 9ef91dc..bb9ccad 100644
--- a/ppapi/proxy/interface_list.h
+++ b/ppapi/proxy/interface_list.h
@@ -85,7 +85,6 @@ class InterfaceList {
// Old-style add functions. These should be removed when the rest of the
// proxies are converted over to using the new system.
- void AddPPB(const InterfaceProxy::Info* info, Permission perm);
void AddPPP(const InterfaceProxy::Info* info);
PpapiPermissions permissions_;
diff --git a/ppapi/proxy/ppb_testing_proxy.cc b/ppapi/proxy/ppb_testing_proxy.cc
index e4602e8..0b29795 100644
--- a/ppapi/proxy/ppb_testing_proxy.cc
+++ b/ppapi/proxy/ppb_testing_proxy.cc
@@ -139,10 +139,6 @@ const PPB_Testing_Private testing_interface = {
&SetMinimumArrayBufferSizeForShmem
};
-InterfaceProxy* CreateTestingProxy(Dispatcher* dispatcher) {
- return new PPB_Testing_Proxy(dispatcher);
-}
-
} // namespace
PPB_Testing_Proxy::PPB_Testing_Proxy(Dispatcher* dispatcher)
@@ -158,15 +154,8 @@ PPB_Testing_Proxy::~PPB_Testing_Proxy() {
}
// static
-const InterfaceProxy::Info* PPB_Testing_Proxy::GetInfo() {
- static const Info info = {
- &testing_interface,
- PPB_TESTING_PRIVATE_INTERFACE,
- API_ID_PPB_TESTING,
- false,
- &CreateTestingProxy,
- };
- return &info;
+const PPB_Testing_Private* PPB_Testing_Proxy::GetProxyInterface() {
+ return &testing_interface;
}
bool PPB_Testing_Proxy::OnMessageReceived(const IPC::Message& msg) {
diff --git a/ppapi/proxy/ppb_testing_proxy.h b/ppapi/proxy/ppb_testing_proxy.h
index bee539a..bcdb53b 100644
--- a/ppapi/proxy/ppb_testing_proxy.h
+++ b/ppapi/proxy/ppb_testing_proxy.h
@@ -25,7 +25,7 @@ class PPB_Testing_Proxy : public InterfaceProxy {
PPB_Testing_Proxy(Dispatcher* dispatcher);
virtual ~PPB_Testing_Proxy();
- static const Info* GetInfo();
+ static const PPB_Testing_Private* GetProxyInterface();
// InterfaceProxy implementation.
virtual bool OnMessageReceived(const IPC::Message& msg);
diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.cc b/ppapi/proxy/ppb_var_deprecated_proxy.cc
index 212a839..c29e152 100644
--- a/ppapi/proxy/ppb_var_deprecated_proxy.cc
+++ b/ppapi/proxy/ppb_var_deprecated_proxy.cc
@@ -276,10 +276,6 @@ PP_Var CreateObject(PP_Instance instance,
return ret_var;
}
-InterfaceProxy* CreateVarDeprecatedProxy(Dispatcher* dispatcher) {
- return new PPB_Var_Deprecated_Proxy(dispatcher );
-}
-
} // namespace
PPB_Var_Deprecated_Proxy::PPB_Var_Deprecated_Proxy(
@@ -297,7 +293,7 @@ PPB_Var_Deprecated_Proxy::~PPB_Var_Deprecated_Proxy() {
}
// static
-const InterfaceProxy::Info* PPB_Var_Deprecated_Proxy::GetInfo() {
+const PPB_Var_Deprecated* PPB_Var_Deprecated_Proxy::GetProxyInterface() {
static const PPB_Var_Deprecated var_deprecated_interface = {
ppapi::PPB_Var_Shared::GetVarInterface1_0()->AddRef,
ppapi::PPB_Var_Shared::GetVarInterface1_0()->Release,
@@ -314,15 +310,7 @@ const InterfaceProxy::Info* PPB_Var_Deprecated_Proxy::GetInfo() {
&IsInstanceOf,
&CreateObject
};
-
- static const Info info = {
- &var_deprecated_interface,
- PPB_VAR_DEPRECATED_INTERFACE,
- API_ID_PPB_VAR_DEPRECATED,
- false,
- &CreateVarDeprecatedProxy,
- };
- return &info;
+ return &var_deprecated_interface;
}
bool PPB_Var_Deprecated_Proxy::OnMessageReceived(const IPC::Message& msg) {
diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.h b/ppapi/proxy/ppb_var_deprecated_proxy.h
index 195c29a..db62fc2 100644
--- a/ppapi/proxy/ppb_var_deprecated_proxy.h
+++ b/ppapi/proxy/ppb_var_deprecated_proxy.h
@@ -28,7 +28,7 @@ class PPB_Var_Deprecated_Proxy : public InterfaceProxy {
explicit PPB_Var_Deprecated_Proxy(Dispatcher* dispatcher);
virtual ~PPB_Var_Deprecated_Proxy();
- static const Info* GetInfo();
+ static const PPB_Var_Deprecated* GetProxyInterface();
// InterfaceProxy implementation.
virtual bool OnMessageReceived(const IPC::Message& msg);