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

Side by Side Diff: ppapi/proxy/ppp_instance_proxy.h

Issue 7874002: This patch tries to remove most of the manual registration for Pepper interfaces, and replaces it... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppp_instance_private_proxy.cc ('k') | ppapi/proxy/ppp_instance_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPP_INSTANCE_PROXY_H_
6 #define PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ 6 #define PPAPI_PROXY_PPP_INSTANCE_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "ppapi/c/pp_instance.h" 12 #include "ppapi/c/pp_instance.h"
13 #include "ppapi/c/pp_resource.h" 13 #include "ppapi/c/pp_resource.h"
14 #include "ppapi/c/pp_var.h" 14 #include "ppapi/c/pp_var.h"
15 #include "ppapi/proxy/interface_proxy.h" 15 #include "ppapi/proxy/interface_proxy.h"
16 #include "ppapi/shared_impl/host_resource.h" 16 #include "ppapi/shared_impl/host_resource.h"
17 #include "ppapi/shared_impl/ppp_instance_combined.h" 17 #include "ppapi/shared_impl/ppp_instance_combined.h"
18 18
19 struct PP_Rect; 19 struct PP_Rect;
20 20
21 namespace ppapi { 21 namespace ppapi {
22 namespace proxy { 22 namespace proxy {
23 23
24 class SerializedVarReturnValue; 24 class SerializedVarReturnValue;
25 25
26 class PPP_Instance_Proxy : public InterfaceProxy { 26 class PPP_Instance_Proxy : public InterfaceProxy {
27 public: 27 public:
28 template <class PPP_Instance_Type> 28 PPP_Instance_Proxy(Dispatcher* dispatcher);
29 PPP_Instance_Proxy(Dispatcher* dispatcher,
30 const PPP_Instance_Type* target_interface)
31 : InterfaceProxy(dispatcher, static_cast<const void*>(target_interface)),
32 combined_interface_(new PPP_Instance_Combined(*target_interface)) {
33 }
34 virtual ~PPP_Instance_Proxy(); 29 virtual ~PPP_Instance_Proxy();
35 30
36 // Return the info for the 1.0 (latest, canonical) version of the interface. 31 // Return the info for the 1.0 (latest, canonical) version of the interface.
37 static const Info* GetInfo1_0(); 32 static const Info* GetInfo1_0();
38 33
39 PPP_Instance_Combined* ppp_instance_target() const { 34 PPP_Instance_Combined* ppp_instance_target() const {
40 return combined_interface_.get(); 35 return combined_interface_.get();
41 } 36 }
42 37
43 // InterfaceProxy implementation. 38 // InterfaceProxy implementation.
(...skipping 14 matching lines...) Expand all
58 void OnMsgHandleDocumentLoad(PP_Instance instance, 53 void OnMsgHandleDocumentLoad(PP_Instance instance,
59 const HostResource& url_loader, 54 const HostResource& url_loader,
60 PP_Bool* result); 55 PP_Bool* result);
61 scoped_ptr<PPP_Instance_Combined> combined_interface_; 56 scoped_ptr<PPP_Instance_Combined> combined_interface_;
62 }; 57 };
63 58
64 } // namespace proxy 59 } // namespace proxy
65 } // namespace ppapi 60 } // namespace ppapi
66 61
67 #endif // PPAPI_PROXY_PPP_INSTANCE_PROXY_H_ 62 #endif // PPAPI_PROXY_PPP_INSTANCE_PROXY_H_
OLDNEW
« no previous file with comments | « ppapi/proxy/ppp_instance_private_proxy.cc ('k') | ppapi/proxy/ppp_instance_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698