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

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

Issue 5410001: Change trusted shared memory interface to match audio.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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/c/trusted/ppb_image_data_trusted.h ('k') | ppapi/cpp/dev/buffer_dev.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) 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 Buffer_Dev : public Resource { 12 class Buffer_Dev : public Resource {
13 public: 13 public:
14 // Creates an is_null() Buffer object. 14 // Creates an is_null() Buffer object.
15 Buffer_Dev(); 15 Buffer_Dev();
16 16
17 Buffer_Dev(const Buffer_Dev& other); 17 Buffer_Dev(const Buffer_Dev& other);
18 18
19 // Allocates a new Buffer in the browser with the given size. The 19 // Allocates a new Buffer in the browser with the given size. The
20 // resulting object will be is_null() if the allocation failed. 20 // resulting object will be is_null() if the allocation failed.
21 explicit Buffer_Dev(int32_t size); 21 explicit Buffer_Dev(uint32_t size);
22 22
23 ~Buffer_Dev(); 23 ~Buffer_Dev();
24 24
25 Buffer_Dev& operator=(const Buffer_Dev& other); 25 Buffer_Dev& operator=(const Buffer_Dev& other);
26 void swap(Buffer_Dev& other); 26 void swap(Buffer_Dev& other);
27 27
28 int32_t size() const { return size_; } 28 uint32_t size() const { return size_; }
29 void* data() const { return data_; } 29 void* data() const { return data_; }
30 30
31 private: 31 private:
32 void* data_; 32 void* data_;
33 int32_t size_; 33 uint32_t size_;
34 }; 34 };
35 35
36 } // namespace pp 36 } // namespace pp
37 37
38 #endif // PPAPI_CPP_DEV_BUFFER_DEV_H_ 38 #endif // PPAPI_CPP_DEV_BUFFER_DEV_H_
39 39
OLDNEW
« no previous file with comments | « ppapi/c/trusted/ppb_image_data_trusted.h ('k') | ppapi/cpp/dev/buffer_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698