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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_buffer.cc

Issue 7740013: Cloning a bunch of stuff from the native_client repository at r6528 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 3 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
(Empty)
1 // Copyright 2010 The Native Client Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can
3 // be found in the LICENSE file.
4
5 #include "native_client/src/shared/ppapi_proxy/plugin_ppb_buffer.h"
6
7 #include <stdio.h>
8 #include <string.h>
9 #include "srpcgen/ppb_rpc.h"
10 #include "native_client/src/include/portability.h"
11 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h"
12 #include "native_client/src/shared/ppapi_proxy/utility.h"
13 #include "native_client/src/shared/srpc/nacl_srpc.h"
14 #include "ppapi/c/dev/ppb_buffer_dev.h"
15
16 namespace ppapi_proxy {
17
18 namespace {
19 PP_Resource Create(PP_Module module, uint32_t size_in_bytes) {
20 UNREFERENCED_PARAMETER(module);
21 UNREFERENCED_PARAMETER(size_in_bytes);
22 return kInvalidResourceId;
23 }
24
25 PP_Bool IsBuffer(PP_Resource resource) {
26 return PluginResource::GetAs<PluginBuffer>(resource).get()
27 ? PP_TRUE : PP_FALSE;
28 }
29
30 PP_Bool Describe(PP_Resource resource, uint32_t* size_in_bytes) {
31 UNREFERENCED_PARAMETER(resource);
32 UNREFERENCED_PARAMETER(size_in_bytes);
33 return PP_FALSE;
34 }
35
36 void* Map(PP_Resource resource) {
37 UNREFERENCED_PARAMETER(resource);
38 return NULL;
39 }
40
41 void Unmap(PP_Resource resource) {
42 UNREFERENCED_PARAMETER(resource);
43 }
44 } // namespace
45
46 const PPB_Buffer_Dev* PluginBuffer::GetInterface() {
47 static const PPB_Buffer_Dev buffer_interface = {
48 Create,
49 IsBuffer,
50 Describe,
51 Map,
52 Unmap,
53 };
54 return &buffer_interface;
55 }
56
57 } // namespace ppapi_proxy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698