diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 22:08:15 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-12-06 22:08:15 +0000 |
commit | 637fc4cd2748b8679a9b4a4a4c518c02b1afa699 (patch) | |
tree | c4bae061c7d0a6f851eb4736290fbfb60009f313 | |
parent | fc1721479f252f369e57fa567a30973ae80e1d58 (diff) | |
download | chromium_src-637fc4cd2748b8679a9b4a4a4c518c02b1afa699.zip chromium_src-637fc4cd2748b8679a9b4a4a4c518c02b1afa699.tar.gz chromium_src-637fc4cd2748b8679a9b4a4a4c518c02b1afa699.tar.bz2 |
Pepper: Remove old-style InterfaceList AddPPB.
InterfaceList currently has two different AddPPB() methods, one of which is
deprecated. This patch removes that version, and I'll send another for
AddPPP().
This is part of some small InterfaceList cleanup I'm doing while adding support
for "dev channel" APIs.
I tested this by loading a page in flash.
BUG=
R=dmichael@chromium.org
Review URL: https://codereview.chromium.org/108533002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239264 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | ppapi/proxy/interface_list.cc | 19 | ||||
-rw-r--r-- | ppapi/proxy/interface_list.h | 1 | ||||
-rw-r--r-- | ppapi/proxy/ppb_testing_proxy.cc | 15 | ||||
-rw-r--r-- | ppapi/proxy/ppb_testing_proxy.h | 2 | ||||
-rw-r--r-- | ppapi/proxy/ppb_var_deprecated_proxy.cc | 16 | ||||
-rw-r--r-- | ppapi/proxy/ppb_var_deprecated_proxy.h | 2 |
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); |