| OLD | NEW |
| 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 |
| OLD | NEW |