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

Side by Side Diff: ppapi/generators/test_thunk/simple_thunk.cc

Issue 238923007: PPAPI: Format ppapi/thunk using clang-format. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 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) 2014 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 // From ../test_thunk/simple.idl modified Fri Nov 16 11:26:06 2012. 5 // From ../test_thunk/simple.idl modified Fri May 31 10:59:55 2013.
6 6
7 #include "ppapi/c/../test_thunk/simple.h" 7 #include "ppapi/c/../test_thunk/simple.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/shared_impl/tracked_callback.h" 9 #include "ppapi/shared_impl/tracked_callback.h"
10 #include "ppapi/thunk/enter.h" 10 #include "ppapi/thunk/enter.h"
11 #include "ppapi/thunk/ppb_instance_api.h" 11 #include "ppapi/thunk/ppapi_thunk_export.h"
12 #include "ppapi/thunk/resource_creation_api.h"
13 #include "ppapi/thunk/simple_api.h" 12 #include "ppapi/thunk/simple_api.h"
14 #include "ppapi/thunk/thunk.h"
15 13
16 namespace ppapi { 14 namespace ppapi {
17 namespace thunk { 15 namespace thunk {
18 16
19 namespace { 17 namespace {
20 18
21 PP_Resource Create(PP_Instance instance) { 19 PP_Resource Create(PP_Instance instance) {
22 VLOG(4) << "PPB_Simple::Create()"; 20 VLOG(4) << "PPB_Simple::Create()";
23 EnterResourceCreation enter(instance); 21 EnterResourceCreation enter(instance);
24 if (enter.failed()) 22 if (enter.failed())
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 71 }
74 72
75 int32_t OnFailure12(PP_Instance instance) { 73 int32_t OnFailure12(PP_Instance instance) {
76 VLOG(4) << "PPB_Simple::OnFailure12()"; 74 VLOG(4) << "PPB_Simple::OnFailure12()";
77 EnterInstance enter(instance); 75 EnterInstance enter(instance);
78 if (enter.failed()) 76 if (enter.failed())
79 return 12; 77 return 12;
80 return enter.functions()->OnFailure12(instance); 78 return enter.functions()->OnFailure12(instance);
81 } 79 }
82 80
83 const PPB_Simple_0_5 g_ppb_simple_thunk_0_5 = { 81 const PPB_Simple_0_5 g_ppb_simple_thunk_0_5 = { //
84 &Create, 82 &Create, //
85 &IsSimple, 83 &IsSimple, //
86 &PostMessage, 84 &PostMessage, //
87 &DoUint32Instance_0_5, 85 &DoUint32Instance_0_5, //
88 &DoUint32Resource, 86 &DoUint32Resource, //
89 &DoUint32ResourceNoErrors 87 &DoUint32ResourceNoErrors //
90 }; 88 };
91 89
92 const PPB_Simple_1_0 g_ppb_simple_thunk_1_0 = { 90 const PPB_Simple_1_0 g_ppb_simple_thunk_1_0 = { //
93 &Create, 91 &Create, //
94 &IsSimple, 92 &IsSimple, //
95 &DoUint32Instance_0_5, 93 &DoUint32Instance_0_5, //
96 &DoUint32Resource, 94 &DoUint32Resource, //
97 &DoUint32ResourceNoErrors, 95 &DoUint32ResourceNoErrors, //
98 &OnFailure12 96 &OnFailure12 //
99 }; 97 };
100 98
101 const PPB_Simple_1_5 g_ppb_simple_thunk_1_5 = { 99 const PPB_Simple_1_5 g_ppb_simple_thunk_1_5 = { //
102 &Create, 100 &Create, //
103 &IsSimple, 101 &IsSimple, //
104 &DoUint32Instance, 102 &DoUint32Instance, //
105 &DoUint32Resource, 103 &DoUint32Resource, //
106 &DoUint32ResourceNoErrors, 104 &DoUint32ResourceNoErrors, //
107 &OnFailure12 105 &OnFailure12 //
108 }; 106 };
109 107
110 } // namespace 108 } // namespace
111 109
112 const PPB_Simple_0_5* GetPPB_Simple_0_5_Thunk() { 110 PPAPI_THUNK_EXPORT const PPB_Simple_0_5* GetPPB_Simple_0_5_Thunk() {
113 return &g_ppb_simple_thunk_0_5; 111 return &g_ppb_simple_thunk_0_5;
114 } 112 }
115 113
116 const PPB_Simple_1_0* GetPPB_Simple_1_0_Thunk() { 114 PPAPI_THUNK_EXPORT const PPB_Simple_1_0* GetPPB_Simple_1_0_Thunk() {
117 return &g_ppb_simple_thunk_1_0; 115 return &g_ppb_simple_thunk_1_0;
118 } 116 }
119 117
120 const PPB_Simple_1_5* GetPPB_Simple_1_5_Thunk() { 118 PPAPI_THUNK_EXPORT const PPB_Simple_1_5* GetPPB_Simple_1_5_Thunk() {
121 return &g_ppb_simple_thunk_1_5; 119 return &g_ppb_simple_thunk_1_5;
122 } 120 }
123 121
124 } // namespace thunk 122 } // namespace thunk
125 } // namespace ppapi 123 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698