OLD | NEW |
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/trusted/ppb_audio_input_trusted_dev.h" | 6 #include "ppapi/c/trusted/ppb_audio_input_trusted_dev.h" |
7 #include "ppapi/thunk/enter.h" | 7 #include "ppapi/thunk/enter.h" |
8 #include "ppapi/thunk/ppb_audio_input_api.h" | 8 #include "ppapi/thunk/ppb_audio_input_api.h" |
9 #include "ppapi/thunk/resource_creation_api.h" | 9 #include "ppapi/thunk/resource_creation_api.h" |
10 #include "ppapi/thunk/thunk.h" | 10 #include "ppapi/thunk/thunk.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 return 0; | 22 return 0; |
23 return enter.functions()->CreateAudioInput(instance_id); | 23 return enter.functions()->CreateAudioInput(instance_id); |
24 } | 24 } |
25 | 25 |
26 int32_t Open(PP_Resource audio_id, | 26 int32_t Open(PP_Resource audio_id, |
27 PP_Resource config_id, | 27 PP_Resource config_id, |
28 PP_CompletionCallback callback) { | 28 PP_CompletionCallback callback) { |
29 EnterAudioInput enter(audio_id, callback, true); | 29 EnterAudioInput enter(audio_id, callback, true); |
30 if (enter.failed()) | 30 if (enter.failed()) |
31 return enter.retval(); | 31 return enter.retval(); |
32 return enter.SetResult(enter.object()->OpenTrusted("", config_id, callback)); | 32 return enter.SetResult(enter.object()->OpenTrusted("", config_id, |
| 33 enter.callback())); |
33 } | 34 } |
34 | 35 |
35 int32_t GetSyncSocket(PP_Resource audio_id, int* sync_socket) { | 36 int32_t GetSyncSocket(PP_Resource audio_id, int* sync_socket) { |
36 EnterAudioInput enter(audio_id, true); | 37 EnterAudioInput enter(audio_id, true); |
37 if (enter.failed()) | 38 if (enter.failed()) |
38 return enter.retval(); | 39 return enter.retval(); |
39 return enter.object()->GetSyncSocket(sync_socket); | 40 return enter.object()->GetSyncSocket(sync_socket); |
40 } | 41 } |
41 | 42 |
42 int32_t GetSharedMemory(PP_Resource audio_id, | 43 int32_t GetSharedMemory(PP_Resource audio_id, |
(...skipping 13 matching lines...) Expand all Loading... |
56 }; | 57 }; |
57 | 58 |
58 } // namespace | 59 } // namespace |
59 | 60 |
60 const PPB_AudioInputTrusted_Dev_0_1* GetPPB_AudioInputTrusted_0_1_Thunk() { | 61 const PPB_AudioInputTrusted_Dev_0_1* GetPPB_AudioInputTrusted_0_1_Thunk() { |
61 return &g_ppb_audioinput_trusted_thunk; | 62 return &g_ppb_audioinput_trusted_thunk; |
62 } | 63 } |
63 | 64 |
64 } // namespace thunk | 65 } // namespace thunk |
65 } // namespace ppapi | 66 } // namespace ppapi |
OLD | NEW |