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

Unified Diff: ppapi/proxy/ppp_instance_proxy.h

Issue 7189045: Make o.o.p. proxy handle PPP_Instance versions 0.4 and 0.5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 9 years, 6 months 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/proxy/ppapi_proxy_test.cc ('k') | ppapi/proxy/ppp_instance_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppp_instance_proxy.h
diff --git a/ppapi/proxy/ppp_instance_proxy.h b/ppapi/proxy/ppp_instance_proxy.h
index 7c208ca8f0535a0d1c33c164e80ae69612734157..e4ef2ba179e26d3b2d3ffa670fdf0ad871576a51 100644
--- a/ppapi/proxy/ppp_instance_proxy.h
+++ b/ppapi/proxy/ppp_instance_proxy.h
@@ -8,15 +8,16 @@
#include <string>
#include <vector>
+#include "base/memory/scoped_ptr.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_resource.h"
#include "ppapi/c/pp_var.h"
#include "ppapi/proxy/host_resource.h"
#include "ppapi/proxy/interface_proxy.h"
+#include "ppapi/shared_impl/ppp_instance_combined.h"
struct PP_InputEvent;
struct PP_Rect;
-struct PPP_Instance;
namespace pp {
namespace proxy {
@@ -25,13 +26,23 @@ class SerializedVarReturnValue;
class PPP_Instance_Proxy : public InterfaceProxy {
public:
- PPP_Instance_Proxy(Dispatcher* dispatcher, const void* target_interface);
+ template <class PPP_Instance_Type>
+ PPP_Instance_Proxy(Dispatcher* dispatcher,
+ const PPP_Instance_Type* target_interface)
+ : InterfaceProxy(dispatcher, static_cast<const void*>(target_interface)),
+ combined_interface_(
+ new ::ppapi::PPP_Instance_Combined(*target_interface)) {
+ }
virtual ~PPP_Instance_Proxy();
- static const Info* GetInfo();
+ // Return the info for the 0.4 version of the interface.
+ static const Info* GetInfo0_4();
+
+ // Return the info for the 0.5 (latest, canonical) version of the interface.
+ static const Info* GetInfo0_5();
- const PPP_Instance* ppp_instance_target() const {
- return reinterpret_cast<const PPP_Instance*>(target_interface());
+ ::ppapi::PPP_Instance_Combined* ppp_instance_target() const {
+ return combined_interface_.get();
}
// InterfaceProxy implementation.
@@ -57,6 +68,7 @@ class PPP_Instance_Proxy : public InterfaceProxy {
PP_Bool* result);
void OnMsgGetInstanceObject(PP_Instance instance,
SerializedVarReturnValue result);
+ scoped_ptr< ::ppapi::PPP_Instance_Combined> combined_interface_;
};
} // namespace proxy
« no previous file with comments | « ppapi/proxy/ppapi_proxy_test.cc ('k') | ppapi/proxy/ppp_instance_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698