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

Side by Side Diff: ppapi/shared_impl/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
« no previous file with comments | « ppapi/shared_impl/ppb_var_shared.cc ('k') | ppapi/tests/test_post_message.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) 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_SHARED_IMPL_VAR_H_ 5 #ifndef PPAPI_SHARED_IMPL_VAR_H_
6 #define PPAPI_SHARED_IMPL_VAR_H_ 6 #define PPAPI_SHARED_IMPL_VAR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 // ArrayBufferVar* array = ArrayBufferVar::FromPPVar(var); 133 // ArrayBufferVar* array = ArrayBufferVar::FromPPVar(var);
134 // if (!array) 134 // if (!array)
135 // return false; // Not an ArrayBuffer or an invalid var. 135 // return false; // Not an ArrayBuffer or an invalid var.
136 // DoSomethingWithTheBuffer(array); 136 // DoSomethingWithTheBuffer(array);
137 class PPAPI_SHARED_EXPORT ArrayBufferVar : public Var { 137 class PPAPI_SHARED_EXPORT ArrayBufferVar : public Var {
138 public: 138 public:
139 ArrayBufferVar(); 139 ArrayBufferVar();
140 virtual ~ArrayBufferVar(); 140 virtual ~ArrayBufferVar();
141 141
142 virtual void* Map() = 0; 142 virtual void* Map() = 0;
143 virtual void Unmap() = 0;
143 virtual uint32 ByteLength() = 0; 144 virtual uint32 ByteLength() = 0;
144 145
145 // Var override. 146 // Var override.
146 virtual ArrayBufferVar* AsArrayBufferVar() OVERRIDE; 147 virtual ArrayBufferVar* AsArrayBufferVar() OVERRIDE;
147 virtual PP_VarType GetType() const OVERRIDE; 148 virtual PP_VarType GetType() const OVERRIDE;
148 149
149 // Helper function that converts a PP_Var to an ArrayBufferVar. This will 150 // Helper function that converts a PP_Var to an ArrayBufferVar. This will
150 // return NULL if the PP_Var is not of ArrayBuffer type. 151 // return NULL if the PP_Var is not of ArrayBuffer type.
151 static ArrayBufferVar* FromPPVar(PP_Var var); 152 static ArrayBufferVar* FromPPVar(PP_Var var);
152 153
153 private: 154 private:
154 DISALLOW_COPY_AND_ASSIGN(ArrayBufferVar); 155 DISALLOW_COPY_AND_ASSIGN(ArrayBufferVar);
155 }; 156 };
156 157
157 } // namespace ppapi 158 } // namespace ppapi
158 159
159 #endif // PPAPI_SHARED_IMPL_VAR_H_ 160 #endif // PPAPI_SHARED_IMPL_VAR_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/ppb_var_shared.cc ('k') | ppapi/tests/test_post_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698