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

Side by Side Diff: webkit/plugins/ppapi/ppb_graphics_3d_impl.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 WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h" 9 #include "ppapi/shared_impl/ppb_graphics_3d_shared.h"
10 #include "ppapi/shared_impl/resource.h" 10 #include "ppapi/shared_impl/resource.h"
11 #include "webkit/plugins/ppapi/plugin_delegate.h" 11 #include "webkit/plugins/ppapi/plugin_delegate.h"
12 12
13 namespace webkit { 13 namespace webkit {
14 namespace ppapi { 14 namespace ppapi {
15 15
16 class PPB_Graphics3D_Impl : public ::ppapi::Resource, 16 class PPB_Graphics3D_Impl : public ::ppapi::PPB_Graphics3D_Shared {
17 public ::ppapi::PPB_Graphics3D_Shared {
18 public: 17 public:
19 virtual ~PPB_Graphics3D_Impl(); 18 virtual ~PPB_Graphics3D_Impl();
20 19
21 static PP_Resource Create(PP_Instance instance, 20 static PP_Resource Create(PP_Instance instance,
22 PP_Resource share_context, 21 PP_Resource share_context,
23 const int32_t* attrib_list); 22 const int32_t* attrib_list);
24 static PP_Resource CreateRaw(PP_Instance instance, 23 static PP_Resource CreateRaw(PP_Instance instance,
25 PP_Resource share_context, 24 PP_Resource share_context,
26 const int32_t* attrib_list); 25 const int32_t* attrib_list);
27 26
28 // Resource override.
29 virtual ::ppapi::thunk::PPB_Graphics3D_API* AsPPB_Graphics3D_API() OVERRIDE;
30
31 // PPB_Graphics3D_API trusted implementation. 27 // PPB_Graphics3D_API trusted implementation.
32 virtual PP_Bool InitCommandBuffer() OVERRIDE; 28 virtual PP_Bool InitCommandBuffer() OVERRIDE;
33 virtual PP_Bool SetGetBuffer(int32_t transfer_buffer_id) OVERRIDE; 29 virtual PP_Bool SetGetBuffer(int32_t transfer_buffer_id) OVERRIDE;
34 virtual PP_Graphics3DTrustedState GetState() OVERRIDE; 30 virtual PP_Graphics3DTrustedState GetState() OVERRIDE;
35 virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE; 31 virtual int32_t CreateTransferBuffer(uint32_t size) OVERRIDE;
36 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE; 32 virtual PP_Bool DestroyTransferBuffer(int32_t id) OVERRIDE;
37 virtual PP_Bool GetTransferBuffer(int32_t id, 33 virtual PP_Bool GetTransferBuffer(int32_t id,
38 int* shm_handle, 34 int* shm_handle,
39 uint32_t* shm_size) OVERRIDE; 35 uint32_t* shm_size) OVERRIDE;
40 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE; 36 virtual PP_Bool Flush(int32_t put_offset) OVERRIDE;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 scoped_ptr<PluginDelegate::PlatformContext3D> platform_context_; 83 scoped_ptr<PluginDelegate::PlatformContext3D> platform_context_;
88 base::WeakPtrFactory<PPB_Graphics3D_Impl> weak_ptr_factory_; 84 base::WeakPtrFactory<PPB_Graphics3D_Impl> weak_ptr_factory_;
89 85
90 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Impl); 86 DISALLOW_COPY_AND_ASSIGN(PPB_Graphics3D_Impl);
91 }; 87 };
92 88
93 } // namespace ppapi 89 } // namespace ppapi
94 } // namespace webkit 90 } // namespace webkit
95 91
96 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_ 92 #endif // WEBKIT_PLUGINS_PPAPI_PPB_GRAPHICS_3D_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698