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

Side by Side Diff: ppapi/thunk/ppb_buffer_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/dev/ppb_buffer_dev.h" 5 #include "ppapi/c/dev/ppb_buffer_dev.h"
6 #include "ppapi/thunk/thunk.h" 6 #include "ppapi/thunk/thunk.h"
7 #include "ppapi/thunk/enter.h" 7 #include "ppapi/thunk/enter.h"
8 #include "ppapi/thunk/ppb_buffer_api.h" 8 #include "ppapi/thunk/ppb_buffer_api.h"
9 #include "ppapi/thunk/resource_creation_api.h" 9 #include "ppapi/thunk/resource_creation_api.h"
10 10
(...skipping 29 matching lines...) Expand all
40 return NULL; 40 return NULL;
41 return enter.object()->Map(); 41 return enter.object()->Map();
42 } 42 }
43 43
44 void Unmap(PP_Resource resource) { 44 void Unmap(PP_Resource resource) {
45 EnterResource<PPB_Buffer_API> enter(resource, true); 45 EnterResource<PPB_Buffer_API> enter(resource, true);
46 if (enter.succeeded()) 46 if (enter.succeeded())
47 enter.object()->Unmap(); 47 enter.object()->Unmap();
48 } 48 }
49 49
50 const PPB_Buffer_Dev g_ppb_buffer_thunk = { 50 const PPB_Buffer_Dev g_ppb_buffer_thunk = {&Create, &IsBuffer, &Describe,
51 &Create, 51 &Map, &Unmap, };
52 &IsBuffer,
53 &Describe,
54 &Map,
55 &Unmap,
56 };
57 52
58 } // namespace 53 } // namespace
59 54
60 const PPB_Buffer_Dev_0_4* GetPPB_Buffer_Dev_0_4_Thunk() { 55 const PPB_Buffer_Dev_0_4* GetPPB_Buffer_Dev_0_4_Thunk() {
61 return &g_ppb_buffer_thunk; 56 return &g_ppb_buffer_thunk;
62 } 57 }
63 58
64 } // namespace thunk 59 } // namespace thunk
65 } // namespace ppapi 60 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698