Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1051)

Unified Diff: public/platform/WebSourceInfo.h

Issue 15796004: [MediaStream API] Adding MediaStreamTrack::getSourceInfos (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments and merge Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « public/platform/WebMediaStreamCenter.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « public/platform/WebMediaStreamCenter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698