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

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

Issue 238923007: PPAPI: Format ppapi/thunk using clang-format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use Popen instead, force carriage returns in thunks Created 6 years, 8 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
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_errors.h" 5 #include "ppapi/c/pp_errors.h"
6 #include "ppapi/c/private/ppb_flash_file.h" 6 #include "ppapi/c/private/ppb_flash_file.h"
7 #include "ppapi/thunk/enter.h" 7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_file_ref_api.h" 8 #include "ppapi/thunk/ppb_file_ref_api.h"
9 #include "ppapi/thunk/ppb_flash_file_api.h" 9 #include "ppapi/thunk/ppb_flash_file_api.h"
10 #include "ppapi/thunk/thunk.h" 10 #include "ppapi/thunk/thunk.h"
(...skipping 24 matching lines...) Expand all
35 int32_t QueryFile(PP_Resource file_ref_id, struct PP_FileInfo* info) { 35 int32_t QueryFile(PP_Resource file_ref_id, struct PP_FileInfo* info) {
36 // TODO(brettw): this function should take an instance. 36 // TODO(brettw): this function should take an instance.
37 // To work around this, use the PP_Instance from the resource. 37 // To work around this, use the PP_Instance from the resource.
38 PP_Instance instance = GetInstanceFromFileRef(file_ref_id); 38 PP_Instance instance = GetInstanceFromFileRef(file_ref_id);
39 EnterInstanceAPI<PPB_Flash_File_API> enter(instance); 39 EnterInstanceAPI<PPB_Flash_File_API> enter(instance);
40 if (enter.failed()) 40 if (enter.failed())
41 return PP_ERROR_BADARGUMENT; 41 return PP_ERROR_BADARGUMENT;
42 return enter.functions()->QueryFileRef(instance, file_ref_id, info); 42 return enter.functions()->QueryFileRef(instance, file_ref_id, info);
43 } 43 }
44 44
45 const PPB_Flash_File_FileRef g_ppb_flash_file_fileref_thunk = { 45 const PPB_Flash_File_FileRef g_ppb_flash_file_fileref_thunk = {&OpenFile,
46 &OpenFile, 46 &QueryFile};
47 &QueryFile
48 };
49 47
50 } // namespace 48 } // namespace
51 49
52 const PPB_Flash_File_FileRef* GetPPB_Flash_File_FileRef_Thunk() { 50 const PPB_Flash_File_FileRef* GetPPB_Flash_File_FileRef_Thunk() {
53 return &g_ppb_flash_file_fileref_thunk; 51 return &g_ppb_flash_file_fileref_thunk;
54 } 52 }
55 53
56 } // namespace thunk 54 } // namespace thunk
57 } // namespace ppapi 55 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698