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

Unified Diff: Source/core/html/MediaProvider.h

Issue 545933002: Implement HTMLMediaElement::srcObject. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rewrite where each MediaProvider module register a converter method. Created 6 years, 3 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
Index: Source/core/html/MediaProvider.h
diff --git a/Source/platform/mediastream/RTCStatsRequest.h b/Source/core/html/MediaProvider.h
similarity index 70%
copy from Source/platform/mediastream/RTCStatsRequest.h
copy to Source/core/html/MediaProvider.h
index c397f90ab7ec90a65a7a5312bdd250e527eea561..aa566ba36496b5e79c69911ca1c263aae793b003 100644
--- a/Source/platform/mediastream/RTCStatsRequest.h
+++ b/Source/core/html/MediaProvider.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -28,34 +28,36 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef RTCStatsRequest_h
-#define RTCStatsRequest_h
+#ifndef MediaProvider_h
+#define MediaProvider_h
#include "platform/heap/Handle.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/WTFString.h"
+#include "wtf/Assertions.h"
namespace blink {
-class MediaStreamComponent;
-class MediaStreamDescriptor;
-class RTCStatsResponseBase;
+class EventTarget;
+class MediaProvider;
+class ScriptValue;
-class RTCStatsRequest : public GarbageCollectedFinalized<RTCStatsRequest> {
+class MediaProviderConverter {
public:
- virtual ~RTCStatsRequest() { }
-
- virtual RTCStatsResponseBase* createResponse() = 0;
- virtual bool hasSelector() = 0;
- virtual MediaStreamComponent* component() = 0;
- virtual void requestSucceeded(RTCStatsResponseBase*) = 0;
+ MediaProviderConverter();
+ virtual MediaProvider* getMediaProvider(const ScriptValue&) = 0;
perkj_chrome 2014/09/11 17:31:45 Is there some type of function pointers in blink I
philipj_slow 2014/09/11 19:07:53 I haven't looked at any of the code yet, but it so
+ static MediaProvider* convert(const ScriptValue&);
+protected:
+ virtual ~MediaProviderConverter() { }
+};
- virtual void trace(Visitor*) { }
+class MediaProvider : public WillBeGarbageCollectedMixin {
+public:
+ MediaProvider(RawPtr<MediaProviderConverter>);
+ virtual ~MediaProvider() { };
-protected:
- RTCStatsRequest() { }
+ virtual EventTarget* eventTarget() = 0;
+ virtual const String& getObjectUrl() = 0;
};
} // namespace blink
-#endif // RTCStatsRequest_h
+#endif

Powered by Google App Engine
This is Rietveld 408576698