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

Side by Side Diff: ppapi/shared_impl/var.h

Issue 174213003: PPAPI: Use clang-format on ppapi/shared_impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove DEPS Created 6 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
« no previous file with comments | « ppapi/shared_impl/url_response_info_data.cc ('k') | ppapi/shared_impl/var.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 virtual void Unmap() = 0; 165 virtual void Unmap() = 0;
166 virtual uint32 ByteLength() = 0; 166 virtual uint32 ByteLength() = 0;
167 167
168 // Creates a new shared memory region, and copies the data in the 168 // Creates a new shared memory region, and copies the data in the
169 // ArrayBufferVar into it. On the plugin side, host_shm_handle_id will be set 169 // ArrayBufferVar into it. On the plugin side, host_shm_handle_id will be set
170 // to some value that is not -1. On the host side, plugin_shm_handle will be 170 // to some value that is not -1. On the host side, plugin_shm_handle will be
171 // set to a valid SharedMemoryHandle. 171 // set to a valid SharedMemoryHandle.
172 // 172 //
173 // Returns true if creating the shared memory (and copying) is successful, 173 // Returns true if creating the shared memory (and copying) is successful,
174 // false otherwise. 174 // false otherwise.
175 virtual bool CopyToNewShmem( 175 virtual bool CopyToNewShmem(PP_Instance instance,
176 PP_Instance instance, 176 int* host_shm_handle_id,
177 int *host_shm_handle_id, 177 base::SharedMemoryHandle* plugin_shm_handle) = 0;
178 base::SharedMemoryHandle *plugin_shm_handle) = 0;
179 178
180 // Var override. 179 // Var override.
181 virtual ArrayBufferVar* AsArrayBufferVar() OVERRIDE; 180 virtual ArrayBufferVar* AsArrayBufferVar() OVERRIDE;
182 virtual PP_VarType GetType() const OVERRIDE; 181 virtual PP_VarType GetType() const OVERRIDE;
183 182
184 // Helper function that converts a PP_Var to an ArrayBufferVar. This will 183 // Helper function that converts a PP_Var to an ArrayBufferVar. This will
185 // return NULL if the PP_Var is not of ArrayBuffer type. 184 // return NULL if the PP_Var is not of ArrayBuffer type.
186 static ArrayBufferVar* FromPPVar(PP_Var var); 185 static ArrayBufferVar* FromPPVar(PP_Var var);
187 186
188 private: 187 private:
189 DISALLOW_COPY_AND_ASSIGN(ArrayBufferVar); 188 DISALLOW_COPY_AND_ASSIGN(ArrayBufferVar);
190 }; 189 };
191 190
192 } // namespace ppapi 191 } // namespace ppapi
193 192
194 #endif // PPAPI_SHARED_IMPL_VAR_H_ 193 #endif // PPAPI_SHARED_IMPL_VAR_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/url_response_info_data.cc ('k') | ppapi/shared_impl/var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698