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

Side by Side Diff: src/shared/ppapi_proxy/plugin_buffer.cc

Issue 4210003: Started on Resource class. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Resource->PluginResource Created 10 years, 1 month 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 | « src/shared/ppapi_proxy/plugin_buffer.h ('k') | src/shared/ppapi_proxy/plugin_core.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 /* 1 /*
2 * Copyright 2010 The Native Client Authors. All rights reserved. 2 * Copyright 2010 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can 3 * Use of this source code is governed by a BSD-style license that can
4 * be found in the LICENSE file. 4 * be found in the LICENSE file.
5 */ 5 */
6 6
7 #include "native_client/src/shared/ppapi_proxy/plugin_buffer.h" 7 #include "native_client/src/shared/ppapi_proxy/plugin_buffer.h"
8 8
9 #include <stdio.h> 9 #include <stdio.h>
10 #include <string.h> 10 #include <string.h>
11 #include "gen/native_client/src/shared/ppapi_proxy/ppb_rpc.h" 11 #include "gen/native_client/src/shared/ppapi_proxy/ppb_rpc.h"
12 #include "native_client/src/include/portability.h" 12 #include "native_client/src/include/portability.h"
13 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h" 13 #include "native_client/src/shared/ppapi_proxy/plugin_globals.h"
14 #include "native_client/src/shared/ppapi_proxy/utility.h" 14 #include "native_client/src/shared/ppapi_proxy/utility.h"
15 #include "native_client/src/shared/srpc/nacl_srpc.h" 15 #include "native_client/src/shared/srpc/nacl_srpc.h"
16 #include "ppapi/c/dev/ppb_buffer_dev.h" 16 #include "ppapi/c/dev/ppb_buffer_dev.h"
17 17
18 namespace ppapi_proxy { 18 namespace ppapi_proxy {
19 19
20 namespace { 20 namespace {
21 PP_Resource Create(PP_Module module, int32_t size_in_bytes) { 21 PP_Resource Create(PP_Module module, int32_t size_in_bytes) {
22 UNREFERENCED_PARAMETER(module); 22 UNREFERENCED_PARAMETER(module);
23 UNREFERENCED_PARAMETER(size_in_bytes); 23 UNREFERENCED_PARAMETER(size_in_bytes);
24 return kInvalidResourceId; 24 return kInvalidResourceId;
25 } 25 }
26 26
27 PP_Bool IsBuffer(PP_Resource resource) { 27 PP_Bool IsBuffer(PP_Resource resource) {
28 UNREFERENCED_PARAMETER(resource); 28 return PluginResource::GetAs<PluginBuffer>(resource).get()
29 return PP_FALSE; 29 ? PP_TRUE : PP_FALSE;
30 } 30 }
31 31
32 PP_Bool Describe(PP_Resource resource, int32_t* size_in_bytes) { 32 PP_Bool Describe(PP_Resource resource, int32_t* size_in_bytes) {
33 UNREFERENCED_PARAMETER(resource); 33 UNREFERENCED_PARAMETER(resource);
34 UNREFERENCED_PARAMETER(size_in_bytes); 34 UNREFERENCED_PARAMETER(size_in_bytes);
35 return PP_FALSE; 35 return PP_FALSE;
36 } 36 }
37 37
38 void* Map(PP_Resource resource) { 38 void* Map(PP_Resource resource) {
39 UNREFERENCED_PARAMETER(resource); 39 UNREFERENCED_PARAMETER(resource);
(...skipping 10 matching lines...) Expand all
50 Create, 50 Create,
51 IsBuffer, 51 IsBuffer,
52 Describe, 52 Describe,
53 Map, 53 Map,
54 Unmap, 54 Unmap,
55 }; 55 };
56 return &intf; 56 return &intf;
57 } 57 }
58 58
59 } // namespace ppapi_proxy 59 } // namespace ppapi_proxy
OLDNEW
« no previous file with comments | « src/shared/ppapi_proxy/plugin_buffer.h ('k') | src/shared/ppapi_proxy/plugin_core.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698