Chromium Code Reviews| 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..96a816de3308afe113b4c33e29e8d98d97f7d4e0 100644 |
| --- a/public/platform/WebRTCDTMFSenderHandler.h |
| +++ b/public/platform/WebSourceInfo.h |
| @@ -23,27 +23,60 @@ |
| * 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&); |
| + |
| + WEBKIT_EXPORT void initialize(const WebString& id, SourceKind, const WebString& label, VideoFacingMode); |
| + WEBKIT_EXPORT void reset(); |
| + bool isNull() const { return m_private.isNull(); } |
| - virtual void setClient(WebRTCDTMFSenderHandlerClient*) = 0; |
| + WEBKIT_EXPORT WebString id() const; |
| + WEBKIT_EXPORT SourceKind kind() const; |
| + WEBKIT_EXPORT WebString label() const; |
| + WEBKIT_EXPORT VideoFacingMode facing() const; |
| - virtual WebString currentToneBuffer() = 0; |
| +#if WEBKIT_IMPLEMENTATION |
| +#endif |
|
abarth-chromium
2013/05/24 16:53:50
IF this section is empty, we can remove it.
Tommy Widenflycht
2013/05/27 14:17:50
Done.
|
| - 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 |