From c77a8dd4b83d07233202f99ce7951e7f002ebec7 Mon Sep 17 00:00:00 2001 From: "dmazzoni@chromium.org" Date: Mon, 12 Sep 2011 20:37:04 +0000 Subject: Revert 100748 - This patch tries to remove most of the manual registration for Pepper interfaces, and replaces it with a list of macros. When files want to know which Pepper interface names and structs there are, they define what they want to do with the macros, and then include the relevant files for the classes of interfaces they want (stable, private, dev). This does not convert all the dev interfaces. I just did a few to keep the patch smaller. So there is still a lot of manual registration. This fixes the previous design problem where we assumed one *_Proxy object == one interface. We have been hacking around this lately with duplicate GetInfo calls, but this doesn't work for PPP interfaces. Now, a _Proxy object is just there to help keep things organized. One proxy can handle zero, one, or many interfaces, and this mapping is controlled by just one line in the interfaces file. So for example, to add a new function to a new version of an interface with backward compatibility, you would add that function to the _api.h file, and write a thunk for the new interface. Then you only need to add one line to the interfaces_ppb_public_stable.h file and that will be hooked up with the proxy and the implementation. This removes some _proxy objects/files that were used only to declare that the interfaces existed, since they're no longer necessary. I folded Console into the Instance API which removed a bunch of code. I removed FileChooser 0.4. I think everybody has converted to the new one, and I think parts of it weren't even hooked up properly anymore. Review URL: http://codereview.chromium.org/7740038 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/7844018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100754 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/proxy/ppb_cursor_control_proxy.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ppapi/proxy/ppb_cursor_control_proxy.h') diff --git a/ppapi/proxy/ppb_cursor_control_proxy.h b/ppapi/proxy/ppb_cursor_control_proxy.h index 6c42c9b..027dbfe 100644 --- a/ppapi/proxy/ppb_cursor_control_proxy.h +++ b/ppapi/proxy/ppb_cursor_control_proxy.h @@ -21,12 +21,15 @@ namespace ppapi { namespace proxy { class PPB_CursorControl_Proxy - : public InterfaceProxy, - public ppapi::thunk::PPB_CursorControl_FunctionAPI { + : public ppapi::FunctionGroupBase, + public ppapi::thunk::PPB_CursorControl_FunctionAPI, + public InterfaceProxy { public: - PPB_CursorControl_Proxy(Dispatcher* dispatcher); + PPB_CursorControl_Proxy(Dispatcher* dispatcher, const void* target_interface); virtual ~PPB_CursorControl_Proxy(); + static const Info* GetInfo(); + // FunctionGroupBase overrides. ppapi::thunk::PPB_CursorControl_FunctionAPI* AsPPB_CursorControl_FunctionAPI() OVERRIDE; @@ -44,8 +47,6 @@ class PPB_CursorControl_Proxy // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; - static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_CURSORCONTROL; - private: // Message handlers. void OnMsgSetCursor(PP_Instance instance, -- cgit v1.1