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

Side by Side Diff: webkit/plugins/ppapi/ppb_buffer_impl.h

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 4 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_BUFFER_IMPL_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/shared_memory.h" 10 #include "base/shared_memory.h"
(...skipping 14 matching lines...) Expand all
25 public: 25 public:
26 virtual ~PPB_Buffer_Impl(); 26 virtual ~PPB_Buffer_Impl();
27 27
28 static PP_Resource Create(PluginInstance* instance, uint32_t size); 28 static PP_Resource Create(PluginInstance* instance, uint32_t size);
29 29
30 virtual PPB_Buffer_Impl* AsPPB_Buffer_Impl(); 30 virtual PPB_Buffer_Impl* AsPPB_Buffer_Impl();
31 31
32 base::SharedMemory* shared_memory() const { return shared_memory_.get(); } 32 base::SharedMemory* shared_memory() const { return shared_memory_.get(); }
33 uint32_t size() const { return size_; } 33 uint32_t size() const { return size_; }
34 34
35 // ResourceObjectBase overrides. 35 // Resource overrides.
36 virtual ::ppapi::thunk::PPB_Buffer_API* AsPPB_Buffer_API() OVERRIDE; 36 virtual ::ppapi::thunk::PPB_Buffer_API* AsPPB_Buffer_API() OVERRIDE;
37 virtual ::ppapi::thunk::PPB_BufferTrusted_API* AsPPB_BufferTrusted_API(); 37 virtual ::ppapi::thunk::PPB_BufferTrusted_API* AsPPB_BufferTrusted_API();
38 38
39 // PPB_Buffer_API implementation. 39 // PPB_Buffer_API implementation.
40 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE; 40 virtual PP_Bool Describe(uint32_t* size_in_bytes) OVERRIDE;
41 virtual PP_Bool IsMapped() OVERRIDE; 41 virtual PP_Bool IsMapped() OVERRIDE;
42 virtual void* Map() OVERRIDE; 42 virtual void* Map() OVERRIDE;
43 virtual void Unmap() OVERRIDE; 43 virtual void Unmap() OVERRIDE;
44 44
45 // PPB_BufferTrusted_API implementation. 45 // PPB_BufferTrusted_API implementation.
(...skipping 29 matching lines...) Expand all
75 void* data_; 75 void* data_;
76 uint32_t size_; 76 uint32_t size_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(BufferAutoMapper); 78 DISALLOW_COPY_AND_ASSIGN(BufferAutoMapper);
79 }; 79 };
80 80
81 } // namespace ppapi 81 } // namespace ppapi
82 } // namespace webkit 82 } // namespace webkit
83 83
84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_ 84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_BUFFER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698