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

Side by Side Diff: ppapi/cpp/dev/buffer_dev.h

Issue 7108051: Implement out-of-process proxy for PPB_Buffer_Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_CPP_DEV_BUFFER_DEV_H_ 5 #ifndef PPAPI_CPP_DEV_BUFFER_DEV_H_
6 #define PPAPI_CPP_DEV_BUFFER_DEV_H_ 6 #define PPAPI_CPP_DEV_BUFFER_DEV_H_
7 7
8 #include "ppapi/cpp/resource.h" 8 #include "ppapi/cpp/resource.h"
9 9
10 namespace pp { 10 namespace pp {
11 11
12 class Instance; 12 class Instance;
13 13
14 class Buffer_Dev : public Resource { 14 class Buffer_Dev : public Resource {
15 public: 15 public:
16 // Creates an is_null() Buffer object. 16 // Creates an is_null() Buffer object.
17 Buffer_Dev(); 17 Buffer_Dev();
18
19 Buffer_Dev(const Buffer_Dev& other); 18 Buffer_Dev(const Buffer_Dev& other);
20 19
21 // Allocates a new Buffer in the browser with the given size. The 20 // Unmap the underlying shared memory.
22 // resulting object will be is_null() if the allocation failed. 21 virtual ~Buffer_Dev();
piman 2011/06/09 23:11:32 nit: move this after the other constructor.
Ami GONE FROM CHROMIUM 2011/06/09 23:35:28 Done.
22
23 // Creates & Maps a new Buffer in the browser with the given size. The
24 // resulting object will be is_null() if either Create() or Map() fails.
23 Buffer_Dev(Instance* instance, uint32_t size); 25 Buffer_Dev(Instance* instance, uint32_t size);
24 26
25 uint32_t size() const { return size_; } 27 uint32_t size() const { return size_; }
26 void* data() const { return data_; } 28 void* data() const { return data_; }
27 29
28 private: 30 private:
29 void* data_; 31 void* data_;
30 uint32_t size_; 32 uint32_t size_;
31 }; 33 };
32 34
33 } // namespace pp 35 } // namespace pp
34 36
35 #endif // PPAPI_CPP_DEV_BUFFER_DEV_H_ 37 #endif // PPAPI_CPP_DEV_BUFFER_DEV_H_
36
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698