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

Side by Side Diff: ppapi/proxy/plugin_array_buffer_var.h

Issue 9169052: Tweaks to PPB_VarArrayBuffer in preperation for taking out of Dev. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes based on reviews Created 8 years, 10 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 PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_ 5 #ifndef PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_
6 #define PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_ 6 #define PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ppapi/c/pp_stdint.h" 11 #include "ppapi/c/pp_stdint.h"
12 #include "ppapi/shared_impl/var.h" 12 #include "ppapi/shared_impl/var.h"
13 13
14 namespace ppapi { 14 namespace ppapi {
15 15
16 // Represents a plugin-side ArrayBufferVar. In the plugin process, it's 16 // Represents a plugin-side ArrayBufferVar. In the plugin process, it's
17 // owned as a vector. 17 // owned as a vector.
18 class PluginArrayBufferVar : public ArrayBufferVar { 18 class PluginArrayBufferVar : public ArrayBufferVar {
19 public: 19 public:
20 explicit PluginArrayBufferVar(uint32 size_in_bytes); 20 explicit PluginArrayBufferVar(uint32 size_in_bytes);
21 virtual ~PluginArrayBufferVar(); 21 virtual ~PluginArrayBufferVar();
22 22
23 // ArrayBufferVar implementation. 23 // ArrayBufferVar implementation.
24 virtual void* Map() OVERRIDE; 24 virtual void* Map() OVERRIDE;
25 virtual void Unmap() OVERRIDE;
25 virtual uint32 ByteLength() OVERRIDE; 26 virtual uint32 ByteLength() OVERRIDE;
26 27
27 private: 28 private:
28 // TODO(dmichael): Use shared memory for this. 29 // TODO(dmichael): Use shared memory for this.
29 std::vector<uint8> buffer_; 30 std::vector<uint8> buffer_;
30 31
31 DISALLOW_COPY_AND_ASSIGN(PluginArrayBufferVar); 32 DISALLOW_COPY_AND_ASSIGN(PluginArrayBufferVar);
32 }; 33 };
33 34
34 } // namespace ppapi 35 } // namespace ppapi
35 36
36 #endif // PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_ 37 #endif // PPAPI_PROXY_PLUGIN_ARRAY_BUFFER_VAR_H_
OLDNEW
« no previous file with comments | « ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_var.cc ('k') | ppapi/proxy/plugin_array_buffer_var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698