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

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

Issue 9053003: Convert ppapi/shared to use TrackedCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments Created 8 years, 11 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_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"
11 #include "gpu/command_buffer/common/command_buffer.h" 11 #include "gpu/command_buffer/common/command_buffer.h"
12 #include "ppapi/c/pp_graphics_3d.h" 12 #include "ppapi/c/pp_graphics_3d.h"
13 #include "ppapi/c/pp_instance.h" 13 #include "ppapi/c/pp_instance.h"
14 #include "ppapi/cpp/completion_callback.h" 14 #include "ppapi/cpp/completion_callback.h"
15 #include "ppapi/proxy/interface_proxy.h" 15 #include "ppapi/proxy/interface_proxy.h"
16 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h" 16 #include "ppapi/proxy/proxy_non_thread_safe_ref_count.h"
17 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h" 17 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h"
18 #include "ppapi/shared_impl/resource.h" 18 #include "ppapi/shared_impl/resource.h"
19 19
20 namespace ppapi { 20 namespace ppapi {
21 21
22 class HostResource; 22 class HostResource;
23 23
24 namespace proxy { 24 namespace proxy {
25 25
26 class Graphics3D : public Resource, public PPB_Graphics3D_Shared { 26 class Graphics3D : public PPB_Graphics3D_Shared {
27 public: 27 public:
28 explicit Graphics3D(const HostResource& resource); 28 explicit Graphics3D(const HostResource& resource);
29 virtual ~Graphics3D(); 29 virtual ~Graphics3D();
30 30
31 bool Init(); 31 bool Init();
32 32
33 // Resource overrides.
34 virtual thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE {
35 return this;
36 }
37
38 // Graphics3DTrusted API. These are not implemented in the proxy. 33 // Graphics3DTrusted API. These are not implemented in the proxy.
39 virtual PP_Bool InitCommandBuffer() OVERRIDE; 34 virtual PP_Bool InitCommandBuffer() OVERRIDE;
40 virtual PP_Bool SetGetBuffer(int32_t shm_id) OVERRIDE; 35 virtual PP_Bool SetGetBuffer(int32_t shm_id) OVERRIDE;
41 virtual PP_Graphics3DTrustedState GetState() OVERRIDE; 36 virtual PP_Graphics3DTrustedState GetState() OVERRIDE;
42 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE; 37 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE;
43 virtual PP_Graphics3DTrustedState FlushSync(int32_t put_offset) OVERRIDE; 38 virtual PP_Graphics3DTrustedState FlushSync(int32_t put_offset) OVERRIDE;
44 virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE; 39 virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE;
45 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; 40 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE;
46 virtual PP_Bool GetTransferBuffer(int32_t id, 41 virtual PP_Bool GetTransferBuffer(int32_t id,
47 int* shm_handle, 42 int* shm_handle,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 ProxyNonThreadSafeRefCount> callback_factory_; 106 ProxyNonThreadSafeRefCount> callback_factory_;
112 107
113 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy); 108 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Proxy);
114 }; 109 };
115 110
116 } // namespace proxy 111 } // namespace proxy
117 } // namespace ppapi 112 } // namespace ppapi
118 113
119 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_ 114 #endif // PPAPI_PROXY_PPB_GRAPHICS_3D_PROXY_H_
120 115
OLDNEW
« no previous file with comments | « no previous file | ppapi/proxy/ppb_graphics_3d_proxy.cc » ('j') | ppapi/shared_impl/ppb_graphics_3d_shared.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698