| 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 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 virtual bool StopPlayback() = 0; | 220 virtual bool StopPlayback() = 0; |
| 221 | 221 |
| 222 // Closes the stream. Make sure to call this before the object is | 222 // Closes the stream. Make sure to call this before the object is |
| 223 // destructed. | 223 // destructed. |
| 224 virtual void ShutDown() = 0; | 224 virtual void ShutDown() = 0; |
| 225 | 225 |
| 226 protected: | 226 protected: |
| 227 virtual ~PlatformAudioOutput() {} | 227 virtual ~PlatformAudioOutput() {} |
| 228 }; | 228 }; |
| 229 | 229 |
| 230 class PlatformAudioInputClient : public PlatformAudioCommonClient { |
| 231 public: |
| 232 virtual void StreamCreationFailed() = 0; |
| 233 |
| 234 protected: |
| 235 virtual ~PlatformAudioInputClient() {} |
| 236 }; |
| 237 |
| 230 class PlatformAudioInput { | 238 class PlatformAudioInput { |
| 231 public: | 239 public: |
| 232 // Starts the capture. Returns false on error or if called before the | 240 // Starts the capture. |
| 233 // stream is created or after the stream is closed. | 241 virtual void StartCapture() = 0; |
| 234 virtual bool StartCapture() = 0; | |
| 235 | 242 |
| 236 // Stops the capture. Returns false on error or if called before the stream | 243 // Stops the capture. |
| 237 // is created or after the stream is closed. | 244 virtual void StopCapture() = 0; |
| 238 virtual bool StopCapture() = 0; | |
| 239 | 245 |
| 240 // Closes the stream. Make sure to call this before the object is | 246 // Closes the stream. Make sure to call this before the object is |
| 241 // destructed. | 247 // destructed. |
| 242 virtual void ShutDown() = 0; | 248 virtual void ShutDown() = 0; |
| 243 | 249 |
| 244 protected: | 250 protected: |
| 245 virtual ~PlatformAudioInput() {} | 251 virtual ~PlatformAudioInput() {} |
| 246 }; | 252 }; |
| 247 | 253 |
| 248 // Interface for PlatformVideoDecoder is directly inherited from general media | 254 // Interface for PlatformVideoDecoder is directly inherited from general media |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 // Get audio hardware output buffer size. | 347 // Get audio hardware output buffer size. |
| 342 virtual uint32_t GetAudioHardwareOutputBufferSize() = 0; | 348 virtual uint32_t GetAudioHardwareOutputBufferSize() = 0; |
| 343 | 349 |
| 344 // The caller is responsible for calling Shutdown() on the returned pointer | 350 // The caller is responsible for calling Shutdown() on the returned pointer |
| 345 // to clean up the corresponding resources allocated during this call. | 351 // to clean up the corresponding resources allocated during this call. |
| 346 virtual PlatformAudioOutput* CreateAudioOutput( | 352 virtual PlatformAudioOutput* CreateAudioOutput( |
| 347 uint32_t sample_rate, | 353 uint32_t sample_rate, |
| 348 uint32_t sample_count, | 354 uint32_t sample_count, |
| 349 PlatformAudioCommonClient* client) = 0; | 355 PlatformAudioCommonClient* client) = 0; |
| 350 | 356 |
| 357 // If |device_id| is empty, the default audio input device will be used. |
| 351 // The caller is responsible for calling Shutdown() on the returned pointer | 358 // The caller is responsible for calling Shutdown() on the returned pointer |
| 352 // to clean up the corresponding resources allocated during this call. | 359 // to clean up the corresponding resources allocated during this call. |
| 353 virtual PlatformAudioInput* CreateAudioInput( | 360 virtual PlatformAudioInput* CreateAudioInput( |
| 361 const std::string& device_id, |
| 354 uint32_t sample_rate, | 362 uint32_t sample_rate, |
| 355 uint32_t sample_count, | 363 uint32_t sample_count, |
| 356 PlatformAudioCommonClient* client) = 0; | 364 PlatformAudioInputClient* client) = 0; |
| 357 | 365 |
| 358 // A pointer is returned immediately, but it is not ready to be used until | 366 // A pointer is returned immediately, but it is not ready to be used until |
| 359 // BrokerConnected has been called. | 367 // BrokerConnected has been called. |
| 360 // The caller is responsible for calling Release() on the returned pointer | 368 // The caller is responsible for calling Release() on the returned pointer |
| 361 // to clean up the corresponding resources allocated during this call. | 369 // to clean up the corresponding resources allocated during this call. |
| 362 virtual Broker* ConnectToBroker(webkit::ppapi::PPB_Broker_Impl* client) = 0; | 370 virtual Broker* ConnectToBroker(webkit::ppapi::PPB_Broker_Impl* client) = 0; |
| 363 | 371 |
| 364 // Notifies that the number of find results has changed. | 372 // Notifies that the number of find results has changed. |
| 365 virtual void NumberOfFindResultsChanged(int identifier, | 373 virtual void NumberOfFindResultsChanged(int identifier, |
| 366 int total, | 374 int total, |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 602 const EnumerateDevicesCallback& callback) = 0; | 610 const EnumerateDevicesCallback& callback) = 0; |
| 603 // Create a ClipboardClient for writing to the clipboard. The caller will own | 611 // Create a ClipboardClient for writing to the clipboard. The caller will own |
| 604 // the pointer to this. | 612 // the pointer to this. |
| 605 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; | 613 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; |
| 606 }; | 614 }; |
| 607 | 615 |
| 608 } // namespace ppapi | 616 } // namespace ppapi |
| 609 } // namespace webkit | 617 } // namespace webkit |
| 610 | 618 |
| 611 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 619 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |