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

Side by Side Diff: ppapi/thunk/ppb_audio_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_audio_input_trusted_thunk.cc ('k') | ppapi/thunk/ppb_audio_trusted_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/thunk/thunk.h" 5 #include "ppapi/thunk/thunk.h"
6 #include "ppapi/thunk/enter.h" 6 #include "ppapi/thunk/enter.h"
7 #include "ppapi/thunk/ppb_audio_api.h" 7 #include "ppapi/thunk/ppb_audio_api.h"
8 #include "ppapi/thunk/resource_creation_api.h" 8 #include "ppapi/thunk/resource_creation_api.h"
9 9
10 namespace ppapi { 10 namespace ppapi {
11 namespace thunk { 11 namespace thunk {
12 12
13 namespace { 13 namespace {
14 14
15 typedef EnterResource<PPB_Audio_API> EnterAudio; 15 typedef EnterResource<PPB_Audio_API> EnterAudio;
16 16
17 PP_Resource Create(PP_Instance instance, 17 PP_Resource Create(PP_Instance instance,
18 PP_Resource config_id, 18 PP_Resource config_id,
19 PPB_Audio_Callback callback, 19 PPB_Audio_Callback callback,
20 void* user_data) { 20 void* user_data) {
21 EnterFunction<ResourceCreationAPI> enter(instance, true); 21 EnterResourceCreation enter(instance);
22 if (enter.failed()) 22 if (enter.failed())
23 return 0; 23 return 0;
24 return enter.functions()->CreateAudio(instance, config_id, 24 return enter.functions()->CreateAudio(instance, config_id,
25 callback, user_data); 25 callback, user_data);
26 } 26 }
27 27
28 PP_Bool IsAudio(PP_Resource resource) { 28 PP_Bool IsAudio(PP_Resource resource) {
29 EnterAudio enter(resource, false); 29 EnterAudio enter(resource, false);
30 return enter.succeeded() ? PP_TRUE : PP_FALSE; 30 return enter.succeeded() ? PP_TRUE : PP_FALSE;
31 } 31 }
(...skipping 28 matching lines...) Expand all
60 }; 60 };
61 61
62 } // namespace 62 } // namespace
63 63
64 const PPB_Audio_1_0* GetPPB_Audio_1_0_Thunk() { 64 const PPB_Audio_1_0* GetPPB_Audio_1_0_Thunk() {
65 return &g_ppb_audio_thunk; 65 return &g_ppb_audio_thunk;
66 } 66 }
67 67
68 } // namespace thunk 68 } // namespace thunk
69 } // namespace ppapi 69 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/thunk/ppb_audio_input_trusted_thunk.cc ('k') | ppapi/thunk/ppb_audio_trusted_thunk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698