| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/shared_memory.h" | 10 #include "base/shared_memory.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 | 37 |
| 38 virtual ~PPB_AudioInput_Impl(); | 38 virtual ~PPB_AudioInput_Impl(); |
| 39 | 39 |
| 40 // Creation function for untrusted plugins. This handles all initialization | 40 // Creation function for untrusted plugins. This handles all initialization |
| 41 // and will return 0 on failure. | 41 // and will return 0 on failure. |
| 42 static PP_Resource Create(PP_Instance instance, | 42 static PP_Resource Create(PP_Instance instance, |
| 43 PP_Resource config_id, | 43 PP_Resource config_id, |
| 44 PPB_AudioInput_Callback audio_input_callback, | 44 PPB_AudioInput_Callback audio_input_callback, |
| 45 void* user_data); | 45 void* user_data); |
| 46 | 46 |
| 47 // Initialization function for non-trusted init. | 47 // Initialization function for trusted init. |
| 48 bool Init(PP_Resource config_id, | 48 bool Init(PP_Resource config_id, |
| 49 PPB_AudioInput_Callback callback, void* user_data); | 49 PPB_AudioInput_Callback callback, |
| 50 void* user_data); |
| 50 | 51 |
| 51 // Resource overrides. | 52 // Resource overrides. |
| 52 virtual ::ppapi::thunk::PPB_AudioInput_API* AsPPB_AudioInput_API() OVERRIDE; | 53 virtual ::ppapi::thunk::PPB_AudioInput_API* AsPPB_AudioInput_API() OVERRIDE; |
| 53 | 54 |
| 54 // PPB_AudioInput_API implementation. | 55 // PPB_AudioInput_API implementation. |
| 55 virtual PP_Resource GetCurrentConfig() OVERRIDE; | 56 virtual PP_Resource GetCurrentConfig() OVERRIDE; |
| 56 virtual PP_Bool StartCapture() OVERRIDE; | 57 virtual PP_Bool StartCapture() OVERRIDE; |
| 57 virtual PP_Bool StopCapture() OVERRIDE; | 58 virtual PP_Bool StopCapture() OVERRIDE; |
| 58 | 59 |
| 59 virtual int32_t OpenTrusted(PP_Resource config_id, | 60 virtual int32_t OpenTrusted(PP_Resource config_id, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 74 // We don't own this pointer but are responsible for calling Shutdown on it. | 75 // We don't own this pointer but are responsible for calling Shutdown on it. |
| 75 PluginDelegate::PlatformAudioInput* audio_input_; | 76 PluginDelegate::PlatformAudioInput* audio_input_; |
| 76 | 77 |
| 77 DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Impl); | 78 DISALLOW_COPY_AND_ASSIGN(PPB_AudioInput_Impl); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace ppapi | 81 } // namespace ppapi |
| 81 } // namespace webkit | 82 } // namespace webkit |
| 82 | 83 |
| 83 #endif // WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ | 84 #endif // WEBKIT_PLUGINS_PPAPI_PPB_AUDIO_INPUT_IMPL_H_ |
| OLD | NEW |