From 5c966027630633c4591f4f7ea2f76fd7c04682d9 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Tue, 13 Sep 2011 18:09:37 +0000 Subject: s 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 re-lands my previous change. Original Review URL: http://codereview.chromium.org/7874002 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/7887001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@100936 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/proxy/ppb_var_deprecated_proxy.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'ppapi/proxy/ppb_var_deprecated_proxy.h') diff --git a/ppapi/proxy/ppb_var_deprecated_proxy.h b/ppapi/proxy/ppb_var_deprecated_proxy.h index d1a45a0..ac8c1fd 100644 --- a/ppapi/proxy/ppb_var_deprecated_proxy.h +++ b/ppapi/proxy/ppb_var_deprecated_proxy.h @@ -26,16 +26,11 @@ class SerializedVarReturnValue; class PPB_Var_Deprecated_Proxy : public InterfaceProxy { public: - PPB_Var_Deprecated_Proxy(Dispatcher* dispatcher, - const void* target_interface); + PPB_Var_Deprecated_Proxy(Dispatcher* dispatcher); virtual ~PPB_Var_Deprecated_Proxy(); static const Info* GetInfo(); - const PPB_Var_Deprecated* ppb_var_target() const { - return static_cast(target_interface()); - } - // InterfaceProxy implementation. virtual bool OnMessageReceived(const IPC::Message& msg); @@ -96,6 +91,10 @@ class PPB_Var_Deprecated_Proxy : public InterfaceProxy { void DoReleaseObject(int64 object_id); ScopedRunnableMethodFactory task_factory_; + + const PPB_Var_Deprecated* ppb_var_impl_; + + DISALLOW_COPY_AND_ASSIGN(PPB_Var_Deprecated_Proxy); }; } // namespace proxy -- cgit v1.1