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

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

Issue 7740038: Use macros to define pepper interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Self review 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
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_GRAPHICS_3D_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPP_GRAPHICS_3D_PROXY_H_
6 #define PPAPI_PROXY_PPP_GRAPHICS_3D_PROXY_H_ 6 #define PPAPI_PROXY_PPP_GRAPHICS_3D_PROXY_H_
7 7
8 #include "ppapi/c/pp_instance.h" 8 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/proxy/interface_proxy.h" 9 #include "ppapi/proxy/interface_proxy.h"
10 #include "ppapi/shared_impl/host_resource.h" 10 #include "ppapi/shared_impl/host_resource.h"
11 11
12 struct PPP_Graphics3D_Dev; 12 struct PPP_Graphics3D_Dev;
13 13
14 namespace ppapi { 14 namespace ppapi {
15 namespace proxy { 15 namespace proxy {
16 16
17 class PPP_Graphics3D_Proxy : public InterfaceProxy { 17 class PPP_Graphics3D_Proxy : public InterfaceProxy {
18 public: 18 public:
19 PPP_Graphics3D_Proxy(Dispatcher* dispatcher, const void* target_interface); 19 PPP_Graphics3D_Proxy(Dispatcher* dispatcher);
20 virtual ~PPP_Graphics3D_Proxy(); 20 virtual ~PPP_Graphics3D_Proxy();
21 21
22 static const Info* GetInfo(); 22 static const Info* GetInfo();
23 23
24 const PPP_Graphics3D_Dev* ppp_graphics_3d_target() const {
25 return reinterpret_cast<const PPP_Graphics3D_Dev*>(target_interface());
26 }
27
28 // InterfaceProxy implementation. 24 // InterfaceProxy implementation.
29 virtual bool OnMessageReceived(const IPC::Message& msg); 25 virtual bool OnMessageReceived(const IPC::Message& msg);
30 26
31 private: 27 private:
32 // Message handlers. 28 // Message handlers.
33 void OnMsgContextLost(PP_Instance instance); 29 void OnMsgContextLost(PP_Instance instance);
30
31 // When this proxy is in the plugin side, this value caches the interface
32 // pointer so we don't have to retrieve it from the dispatcher each time.
33 // In the host, this value is always NULL.
34 const PPP_Graphics3D_Dev* ppp_graphics_3d_impl_;
35
36 DISALLOW_COPY_AND_ASSIGN(PPP_Graphics3D_Proxy);
34 }; 37 };
35 38
36 } // namespace proxy 39 } // namespace proxy
37 } // namespace ppapi 40 } // namespace ppapi
38 41
39 #endif // PPAPI_PROXY_PPP_GRAPHICS_3D_PROXY_H_ 42 #endif // PPAPI_PROXY_PPP_GRAPHICS_3D_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698