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

Side by Side Diff: ppapi/shared_impl/memory_impl.cc

Issue 8849003: Rename the shared_impl resource files to give them more regular names. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | « ppapi/shared_impl/instance_impl.cc ('k') | ppapi/shared_impl/opengles2_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include <stdlib.h>
6
7 #include "ppapi/c/dev/ppb_memory_dev.h"
8 #include "ppapi/shared_impl/ppapi_shared_export.h"
9
10 // The memory interface doesn't have a normal C -> C++ thunk since it doesn't
11 // actually have any proxy wrapping or associated objects; it's just a call
12 // into base. So we implement the entire interface here, using the thunk
13 // namespace so it magically gets hooked up in the proper places.
14
15 namespace ppapi {
16
17 namespace {
18
19 void* MemAlloc(uint32_t num_bytes) {
20 return malloc(num_bytes);
21 }
22
23 void MemFree(void* ptr) {
24 free(ptr);
25 }
26
27 const PPB_Memory_Dev ppb_memory = {
28 &MemAlloc,
29 &MemFree
30 };
31
32 } // namespace
33
34 namespace thunk {
35
36 // static
37 PPAPI_SHARED_EXPORT const PPB_Memory_Dev* GetPPB_Memory_Dev_Thunk() {
38 return &ppb_memory;
39 }
40
41 } // namespace thunk
42
43 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/instance_impl.cc ('k') | ppapi/shared_impl/opengles2_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698