| Index: public/platform/WebSourceInfo.h
|
| diff --git a/public/platform/WebRTCDTMFSenderHandler.h b/public/platform/WebSourceInfo.h
|
| similarity index 57%
|
| copy from public/platform/WebRTCDTMFSenderHandler.h
|
| copy to public/platform/WebSourceInfo.h
|
| index 53c88a463eddfe06e7fa29fe7566d7f75f943e2d..0ae96e78fd9703599fc7687c4ad745e45e07829b 100644
|
| --- a/public/platform/WebRTCDTMFSenderHandler.h
|
| +++ b/public/platform/WebSourceInfo.h
|
| @@ -23,27 +23,57 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef WebRTCDTMFSenderHandler_h
|
| -#define WebRTCDTMFSenderHandler_h
|
| +#ifndef WebSourceInfo_h
|
| +#define WebSourceInfo_h
|
|
|
| #include "WebCommon.h"
|
| +#include "WebNonCopyable.h"
|
| +#include "WebPrivatePtr.h"
|
| #include "WebString.h"
|
|
|
| namespace WebKit {
|
| -class WebRTCDTMFSenderHandlerClient;
|
|
|
| -class WebRTCDTMFSenderHandler {
|
| +class WebSourceInfoPrivate;
|
| +
|
| +class WebSourceInfo {
|
| public:
|
| - virtual ~WebRTCDTMFSenderHandler() { }
|
| + enum SourceKind {
|
| + SourceKindNone,
|
| + SourceKindAudio,
|
| + SourceKindVideo
|
| + };
|
| +
|
| + enum VideoFacingMode {
|
| + VideoFacingModeNone,
|
| + VideoFacingModeUser,
|
| + VideoFacingModeEnvironment
|
| + };
|
| +
|
| + WebSourceInfo() { }
|
| + WebSourceInfo(const WebSourceInfo& other) { assign(other); }
|
| + ~WebSourceInfo() { reset(); }
|
| +
|
| + WebSourceInfo& operator=(const WebSourceInfo& other)
|
| + {
|
| + assign(other);
|
| + return *this;
|
| + }
|
| +
|
| + WEBKIT_EXPORT void assign(const WebSourceInfo&);
|
|
|
| - virtual void setClient(WebRTCDTMFSenderHandlerClient*) = 0;
|
| + WEBKIT_EXPORT void initialize(const WebString& id, SourceKind, const WebString& label, VideoFacingMode);
|
| + WEBKIT_EXPORT void reset();
|
| + bool isNull() const { return m_private.isNull(); }
|
|
|
| - virtual WebString currentToneBuffer() = 0;
|
| + WEBKIT_EXPORT WebString id() const;
|
| + WEBKIT_EXPORT SourceKind kind() const;
|
| + WEBKIT_EXPORT WebString label() const;
|
| + WEBKIT_EXPORT VideoFacingMode facing() const;
|
|
|
| - virtual bool canInsertDTMF() = 0;
|
| - virtual bool insertDTMF(const WebString& tones, long duration, long interToneGap) = 0;
|
| +private:
|
| + WebPrivatePtr<WebSourceInfoPrivate> m_private;
|
| };
|
|
|
| } // namespace WebKit
|
|
|
| -#endif // WebRTCDTMFSenderHandler_h
|
| +#endif // WebSourceInfo_h
|
|
|