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

Side by Side Diff: ppapi/thunk/ppb_file_ref_thunk.cc

Issue 10168026: Delete FunctionGroupBase from Pepper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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/thunk/ppb_directory_reader_thunk.cc ('k') | ppapi/thunk/ppb_flash_message_loop_thunk.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 #include "ppapi/c/pp_file_info.h" 5 #include "ppapi/c/pp_file_info.h"
6 #include "ppapi/c/ppb_file_ref.h" 6 #include "ppapi/c/ppb_file_ref.h"
7 #include "ppapi/c/pp_completion_callback.h" 7 #include "ppapi/c/pp_completion_callback.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/c/private/ppb_file_ref_private.h" 9 #include "ppapi/c/private/ppb_file_ref_private.h"
10 #include "ppapi/thunk/enter.h" 10 #include "ppapi/thunk/enter.h"
11 #include "ppapi/thunk/thunk.h" 11 #include "ppapi/thunk/thunk.h"
12 #include "ppapi/thunk/ppb_file_ref_api.h" 12 #include "ppapi/thunk/ppb_file_ref_api.h"
13 #include "ppapi/thunk/resource_creation_api.h" 13 #include "ppapi/thunk/resource_creation_api.h"
14 14
15 namespace ppapi { 15 namespace ppapi {
16 namespace thunk { 16 namespace thunk {
17 17
18 namespace { 18 namespace {
19 19
20 typedef EnterResource<PPB_FileRef_API> EnterFileRef; 20 typedef EnterResource<PPB_FileRef_API> EnterFileRef;
21 21
22 PP_Resource Create(PP_Resource file_system, const char* path) { 22 PP_Resource Create(PP_Resource file_system, const char* path) {
23 EnterFunctionGivenResource<ResourceCreationAPI> enter(file_system, true); 23 Resource* object =
24 PpapiGlobals::Get()->GetResourceTracker()->GetResource(file_system);
25 if (!object)
26 return 0;
27 EnterResourceCreation enter(object->pp_instance());
24 if (enter.failed()) 28 if (enter.failed())
25 return 0; 29 return 0;
26 return enter.functions()->CreateFileRef(file_system, path); 30 return enter.functions()->CreateFileRef(file_system, path);
27 } 31 }
28 32
29 PP_Bool IsFileRef(PP_Resource resource) { 33 PP_Bool IsFileRef(PP_Resource resource) {
30 EnterFileRef enter(resource, false); 34 EnterFileRef enter(resource, false);
31 return PP_FromBool(enter.succeeded()); 35 return PP_FromBool(enter.succeeded());
32 } 36 }
33 37
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 const PPB_FileRef_1_0* GetPPB_FileRef_1_0_Thunk() { 130 const PPB_FileRef_1_0* GetPPB_FileRef_1_0_Thunk() {
127 return &g_ppb_file_ref_thunk; 131 return &g_ppb_file_ref_thunk;
128 } 132 }
129 133
130 const PPB_FileRefPrivate_0_1* GetPPB_FileRefPrivate_0_1_Thunk() { 134 const PPB_FileRefPrivate_0_1* GetPPB_FileRefPrivate_0_1_Thunk() {
131 return &g_ppb_file_ref_private_thunk; 135 return &g_ppb_file_ref_private_thunk;
132 } 136 }
133 137
134 } // namespace thunk 138 } // namespace thunk
135 } // namespace ppapi 139 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_directory_reader_thunk.cc ('k') | ppapi/thunk/ppb_flash_message_loop_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698