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

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

Issue 14784002: Move DirectoryReader::ReadEntries to FileRef::ReadDirectoryEntries (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebased Created 7 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
« no previous file with comments | « ppapi/thunk/ppb_file_ref_api.h ('k') | ppapi/thunk/resource_creation_api.h » ('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/shared_impl/proxy_lock.h" 10 #include "ppapi/shared_impl/proxy_lock.h"
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 PP_FileInfo* info, 120 PP_FileInfo* info,
121 PP_CompletionCallback callback) { 121 PP_CompletionCallback callback) {
122 VLOG(4) << "PPB_FileRef::Query()"; 122 VLOG(4) << "PPB_FileRef::Query()";
123 EnterFileRef enter(file_ref, callback, true); 123 EnterFileRef enter(file_ref, callback, true);
124 if (enter.failed()) 124 if (enter.failed())
125 return enter.retval(); 125 return enter.retval();
126 return enter.SetResult(enter.object()->Query(info, 126 return enter.SetResult(enter.object()->Query(info,
127 enter.callback())); 127 enter.callback()));
128 } 128 }
129 129
130 int32_t ReadDirectoryEntries(PP_Resource file_ref,
131 PP_ArrayOutput output,
132 PP_CompletionCallback callback) {
133 EnterFileRef enter(file_ref, callback, true);
134 if (enter.failed())
135 return enter.retval();
136 return enter.SetResult(enter.object()->ReadDirectoryEntries(
137 output, enter.callback()));
138 }
139
130 PP_Var GetAbsolutePath(PP_Resource file_ref) { 140 PP_Var GetAbsolutePath(PP_Resource file_ref) {
131 VLOG(4) << "PPB_FileRef::GetAbsolutePath"; 141 VLOG(4) << "PPB_FileRef::GetAbsolutePath";
132 EnterFileRef enter(file_ref, true); 142 EnterFileRef enter(file_ref, true);
133 if (enter.failed()) 143 if (enter.failed())
134 return PP_MakeUndefined(); 144 return PP_MakeUndefined();
135 return enter.object()->GetAbsolutePath(); 145 return enter.object()->GetAbsolutePath();
136 } 146 }
137 147
138 const PPB_FileRef_1_0 g_ppb_file_ref_thunk_1_0 = { 148 const PPB_FileRef_1_0 g_ppb_file_ref_thunk_1_0 = {
139 &Create, 149 &Create,
(...skipping 12 matching lines...) Expand all
152 &Create, 162 &Create,
153 &IsFileRef, 163 &IsFileRef,
154 &GetFileSystemType, 164 &GetFileSystemType,
155 &GetName, 165 &GetName,
156 &GetPath, 166 &GetPath,
157 &GetParent, 167 &GetParent,
158 &MakeDirectory, 168 &MakeDirectory,
159 &Touch, 169 &Touch,
160 &Delete, 170 &Delete,
161 &Rename, 171 &Rename,
162 &Query 172 &Query,
173 &ReadDirectoryEntries
163 }; 174 };
164 175
165 const PPB_FileRefPrivate g_ppb_file_ref_private_thunk = { 176 const PPB_FileRefPrivate g_ppb_file_ref_private_thunk = {
166 &GetAbsolutePath 177 &GetAbsolutePath
167 }; 178 };
168 179
169 } // namespace 180 } // namespace
170 181
171 const PPB_FileRef_1_0* GetPPB_FileRef_1_0_Thunk() { 182 const PPB_FileRef_1_0* GetPPB_FileRef_1_0_Thunk() {
172 return &g_ppb_file_ref_thunk_1_0; 183 return &g_ppb_file_ref_thunk_1_0;
173 } 184 }
174 185
175 const PPB_FileRef_1_1* GetPPB_FileRef_1_1_Thunk() { 186 const PPB_FileRef_1_1* GetPPB_FileRef_1_1_Thunk() {
176 return &g_ppb_file_ref_thunk_1_1; 187 return &g_ppb_file_ref_thunk_1_1;
177 } 188 }
178 189
179 const PPB_FileRefPrivate_0_1* GetPPB_FileRefPrivate_0_1_Thunk() { 190 const PPB_FileRefPrivate_0_1* GetPPB_FileRefPrivate_0_1_Thunk() {
180 return &g_ppb_file_ref_private_thunk; 191 return &g_ppb_file_ref_private_thunk;
181 } 192 }
182 193
183 } // namespace thunk 194 } // namespace thunk
184 } // namespace ppapi 195 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_file_ref_api.h ('k') | ppapi/thunk/resource_creation_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698