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

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

Issue 7740038: Use macros to define pepper interfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: New patch 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/ppb_graphics_2d_proxy.cc ('k') | ppapi/proxy/ppb_graphics_3d_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_PPB_GRAPHICS_3D_PROXY_H_ 5 #ifndef PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 6 #define PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 virtual int32 DoSwapBuffers() OVERRIDE; 56 virtual int32 DoSwapBuffers() OVERRIDE;
57 57
58 private: 58 private:
59 scoped_ptr<gpu::CommandBuffer> command_buffer_; 59 scoped_ptr<gpu::CommandBuffer> command_buffer_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(Graphics3D); 61 DISALLOW_COPY_AND_ASSIGN(Graphics3D);
62 }; 62 };
63 63
64 class PPB_Graphics3D_Proxy : public InterfaceProxy { 64 class PPB_Graphics3D_Proxy : public InterfaceProxy {
65 public: 65 public:
66 PPB_Graphics3D_Proxy(Dispatcher* dispatcher, const void* target_interface); 66 PPB_Graphics3D_Proxy(Dispatcher* dispatcher);
67 virtual ~PPB_Graphics3D_Proxy(); 67 virtual ~PPB_Graphics3D_Proxy();
68 68
69 static const Info* GetInfo();
70
71 static PP_Resource CreateProxyResource(PP_Instance instance, 69 static PP_Resource CreateProxyResource(PP_Instance instance,
72 PP_Resource share_context, 70 PP_Resource share_context,
73 const int32_t* attrib_list); 71 const int32_t* attrib_list);
74 72
75 const PPB_Graphics3D* ppb_graphics_3d_target() const {
76 return static_cast<const PPB_Graphics3D*>(target_interface());
77 }
78
79 // InterfaceProxy implementation. 73 // InterfaceProxy implementation.
80 virtual bool OnMessageReceived(const IPC::Message& msg); 74 virtual bool OnMessageReceived(const IPC::Message& msg);
81 75
76 static const InterfaceID kInterfaceID = INTERFACE_ID_PPB_GRAPHICS_3D;
77
82 private: 78 private:
83 void OnMsgCreate(PP_Instance instance, 79 void OnMsgCreate(PP_Instance instance,
84 const std::vector<int32_t>& attribs, 80 const std::vector<int32_t>& attribs,
85 HostResource* result); 81 HostResource* result);
86 void OnMsgInitCommandBuffer(const HostResource& context, 82 void OnMsgInitCommandBuffer(const HostResource& context,
87 int32 size, 83 int32 size,
88 base::SharedMemoryHandle* ring_buffer); 84 base::SharedMemoryHandle* ring_buffer);
89 void OnMsgGetState(const HostResource& context, 85 void OnMsgGetState(const HostResource& context,
90 gpu::CommandBuffer::State* state); 86 gpu::CommandBuffer::State* state);
91 void OnMsgFlush(const HostResource& context, 87 void OnMsgFlush(const HostResource& context,
(...skipping 23 matching lines...) Expand all
115 ProxyNonThreadSafeRefCount> callback_factory_; 111 ProxyNonThreadSafeRefCount> callback_factory_;
116 112
117 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); 113 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy);
118 }; 114 };
119 115
120 } // namespace proxy 116 } // namespace proxy
121 } // namespace ppapi 117 } // namespace ppapi
122 118
123 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 119 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
124 120
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_graphics_2d_proxy.cc ('k') | ppapi/proxy/ppb_graphics_3d_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698