| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_GLUE_PLUGINS_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_ | 5 #ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_ |
| 6 #define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_ | 6 #define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "third_party/npapi/bindings/npapi_extensions.h" | 9 #include "third_party/npapi/bindings/npapi_extensions.h" |
| 10 | 10 |
| 11 namespace webkit_glue { | 11 namespace webkit_glue { |
| 12 | 12 |
| 13 // Interface for the NPAPI audio device extension. This class implements "NOP" | 13 // Interface for the NPAPI audio device extension. This class implements "NOP" |
| 14 // versions of all these functions so it can be used seamlessly by the | 14 // versions of all these functions so it can be used seamlessly by the |
| 15 // "regular" plugin delegate while being overridden by the "pepper" one. | 15 // "regular" plugin delegate while being overridden by the "pepper" one. |
| 16 class WebPluginAudioDeviceDelegate { | 16 class WebPluginAudioDeviceDelegate { |
| 17 public: | 17 public: |
| 18 virtual NPError DeviceAudioQueryCapability(int32 capability, int32* value) { | 18 virtual NPError DeviceAudioQueryCapability(int32 capability, int32* value); |
| 19 return NPERR_GENERIC_ERROR; | |
| 20 } | |
| 21 virtual NPError DeviceAudioQueryConfig( | 19 virtual NPError DeviceAudioQueryConfig( |
| 22 const NPDeviceContextAudioConfig* request, | 20 const NPDeviceContextAudioConfig* request, |
| 23 NPDeviceContextAudioConfig* obtain) { | 21 NPDeviceContextAudioConfig* obtain); |
| 24 return NPERR_GENERIC_ERROR; | |
| 25 } | |
| 26 virtual NPError DeviceAudioInitializeContext( | 22 virtual NPError DeviceAudioInitializeContext( |
| 27 const NPDeviceContextAudioConfig* config, | 23 const NPDeviceContextAudioConfig* config, |
| 28 NPDeviceContextAudio* context) { | 24 NPDeviceContextAudio* context); |
| 29 return NPERR_GENERIC_ERROR; | |
| 30 } | |
| 31 virtual NPError DeviceAudioSetStateContext(NPDeviceContextAudio* context, | 25 virtual NPError DeviceAudioSetStateContext(NPDeviceContextAudio* context, |
| 32 int32 state, intptr_t value) { | 26 int32 state, intptr_t value); |
| 33 return NPERR_GENERIC_ERROR; | |
| 34 } | |
| 35 virtual NPError DeviceAudioGetStateContext(NPDeviceContextAudio* context, | 27 virtual NPError DeviceAudioGetStateContext(NPDeviceContextAudio* context, |
| 36 int32 state, intptr_t* value) { | 28 int32 state, intptr_t* value); |
| 37 return NPERR_GENERIC_ERROR; | |
| 38 } | |
| 39 virtual NPError DeviceAudioFlushContext( | 29 virtual NPError DeviceAudioFlushContext( |
| 40 NPP id, NPDeviceContextAudio* context, | 30 NPP id, NPDeviceContextAudio* context, |
| 41 NPDeviceFlushContextCallbackPtr callback, void* user_data) { | 31 NPDeviceFlushContextCallbackPtr callback, void* user_data); |
| 42 return NPERR_GENERIC_ERROR; | 32 virtual NPError DeviceAudioDestroyContext(NPDeviceContextAudio* context); |
| 43 } | |
| 44 virtual NPError DeviceAudioDestroyContext(NPDeviceContextAudio* context) { | |
| 45 return NPERR_GENERIC_ERROR; | |
| 46 } | |
| 47 | 33 |
| 48 protected: | 34 protected: |
| 49 WebPluginAudioDeviceDelegate() {} | 35 WebPluginAudioDeviceDelegate() {} |
| 50 virtual ~WebPluginAudioDeviceDelegate() {} | 36 virtual ~WebPluginAudioDeviceDelegate() {} |
| 51 }; | 37 }; |
| 52 | 38 |
| 53 } // namespace webkit_glue | 39 } // namespace webkit_glue |
| 54 | 40 |
| 55 #endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_ | 41 #endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_ |
| 56 | 42 |
| OLD | NEW |