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

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

Issue 5539001: Remove all the swap() stuff in the PPAPI C++ wrappers.... (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 | « no previous file | 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(int32_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);
27 26
28 int32_t size() const { return size_; } 27 int32_t size() const { return size_; }
29 void* data() const { return data_; } 28 void* data() const { return data_; }
30 29
31 private: 30 private:
32 void* data_; 31 void* data_;
33 int32_t size_; 32 int32_t size_;
34 }; 33 };
35 34
36 } // namespace pp 35 } // namespace pp
37 36
38 #endif // PPAPI_CPP_DEV_BUFFER_DEV_H_ 37 #endif // PPAPI_CPP_DEV_BUFFER_DEV_H_
39 38
OLDNEW
« no previous file with comments | « no previous file | ppapi/cpp/dev/buffer_dev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698