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

Unified Diff: public/platform/WebMediaStreamTrackSourcesRequest.h

Issue 16778002: MediaStream API: Changing the device enumeration to be async (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review comment fixed 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/WebMediaStreamTrackSourcesRequest.h
diff --git a/public/platform/WebSourceInfo.h b/public/platform/WebMediaStreamTrackSourcesRequest.h
similarity index 54%
copy from public/platform/WebSourceInfo.h
copy to public/platform/WebMediaStreamTrackSourcesRequest.h
index 0ae96e78fd9703599fc7687c4ad745e45e07829b..1541fc3c732272169b7e3dc105bc53fd68a29512 100644
--- a/public/platform/WebSourceInfo.h
+++ b/public/platform/WebMediaStreamTrackSourcesRequest.h
@@ -23,57 +23,62 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebSourceInfo_h
-#define WebSourceInfo_h
+#ifndef WebMediaStreamTrackSourcesRequest_h
+#define WebMediaStreamTrackSourcesRequest_h
#include "WebCommon.h"
#include "WebNonCopyable.h"
#include "WebPrivatePtr.h"
#include "WebString.h"
+#include "WebVector.h"
-namespace WebKit {
+namespace WebCore {
+class MediaStreamTrackSourcesRequest;
+}
-class WebSourceInfoPrivate;
+namespace WebKit {
+class WebSourceInfo;
-class WebSourceInfo {
+class WebMediaStreamTrackSourcesRequest {
public:
- enum SourceKind {
- SourceKindNone,
- SourceKindAudio,
- SourceKindVideo
- };
-
- enum VideoFacingMode {
- VideoFacingModeNone,
- VideoFacingModeUser,
- VideoFacingModeEnvironment
+ class ExtraData {
+ public:
+ virtual ~ExtraData() { }
};
- WebSourceInfo() { }
- WebSourceInfo(const WebSourceInfo& other) { assign(other); }
- ~WebSourceInfo() { reset(); }
+ WebMediaStreamTrackSourcesRequest() { }
+ WebMediaStreamTrackSourcesRequest(const WebMediaStreamTrackSourcesRequest& other) { assign(other); }
+ ~WebMediaStreamTrackSourcesRequest() { reset(); }
- WebSourceInfo& operator=(const WebSourceInfo& other)
+ WebMediaStreamTrackSourcesRequest& operator=(const WebMediaStreamTrackSourcesRequest& other)
{
assign(other);
return *this;
}
- WEBKIT_EXPORT void assign(const WebSourceInfo&);
+ WEBKIT_EXPORT void assign(const WebMediaStreamTrackSourcesRequest&);
- WEBKIT_EXPORT void initialize(const WebString& id, SourceKind, const WebString& label, VideoFacingMode);
WEBKIT_EXPORT void reset();
bool isNull() const { return m_private.isNull(); }
- WEBKIT_EXPORT WebString id() const;
- WEBKIT_EXPORT SourceKind kind() const;
- WEBKIT_EXPORT WebString label() const;
- WEBKIT_EXPORT VideoFacingMode facing() const;
+ WEBKIT_EXPORT WebString origin() const;
+ WEBKIT_EXPORT void requestSucceeded(const WebVector<WebSourceInfo>&) const;
+
+ // Extra data associated with this object.
+ // If non-null, the extra data pointer will be deleted when the object is destroyed.
+ // Setting the extra data pointer will cause any existing non-null
+ // extra data pointer to be deleted.
+ WEBKIT_EXPORT ExtraData* extraData() const;
+ WEBKIT_EXPORT void setExtraData(ExtraData*);
+
+#if WEBKIT_IMPLEMENTATION
+ WebMediaStreamTrackSourcesRequest(const WTF::PassRefPtr<WebCore::MediaStreamTrackSourcesRequest>&);
+#endif
private:
- WebPrivatePtr<WebSourceInfoPrivate> m_private;
+ WebPrivatePtr<WebCore::MediaStreamTrackSourcesRequest> m_private;
};
} // namespace WebKit
-#endif // WebSourceInfo_h
+#endif // WebMediaStreamTrackSourcesRequest_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