Title: [99796] trunk/Source/WebKit/chromium
Revision
99796
Author
[email protected]
Date
2011-11-09 18:25:10 -0800 (Wed, 09 Nov 2011)

Log Message

[chromium] MediaStream API: Add WebMediaStreamRegistry
https://bugs.webkit.org/show_bug.cgi?id=71458

Patch by Tommy Widenflycht <[email protected]> on 2011-11-09
Reviewed by Darin Fisher.

* WebKit.gyp:
* public/WebMediaStreamRegistry.h: Added.
* src/WebMediaStreamRegistry.cpp: Added.
(WebKit::WebMediaStreamRegistry::lookupMediaStreamDescriptor):

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebKit/chromium/ChangeLog (99795 => 99796)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-11-10 02:05:14 UTC (rev 99795)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-11-10 02:25:10 UTC (rev 99796)
@@ -1,3 +1,15 @@
+2011-11-09  Tommy Widenflycht  <[email protected]>
+
+        [chromium] MediaStream API: Add WebMediaStreamRegistry
+        https://bugs.webkit.org/show_bug.cgi?id=71458
+
+        Reviewed by Darin Fisher.
+
+        * WebKit.gyp:
+        * public/WebMediaStreamRegistry.h: Added.
+        * src/WebMediaStreamRegistry.cpp: Added.
+        (WebKit::WebMediaStreamRegistry::lookupMediaStreamDescriptor):
+
 2011-11-09  Alexandre Elias  <[email protected]>
 
         [chromium] Add draw-time scale delta to compositor thread

Modified: trunk/Source/WebKit/chromium/WebKit.gyp (99795 => 99796)


--- trunk/Source/WebKit/chromium/WebKit.gyp	2011-11-10 02:05:14 UTC (rev 99795)
+++ trunk/Source/WebKit/chromium/WebKit.gyp	2011-11-10 02:25:10 UTC (rev 99796)
@@ -235,6 +235,7 @@
                 'public/WebMediaPlayerAction.h',
                 'public/WebMediaPlayerClient.h',
                 'public/WebMediaStreamDescriptor.h',
+                'public/WebMediaStreamRegistry.h',
                 'public/WebMediaStreamSource.h',
                 'public/WebMenuItemInfo.h',
                 'public/WebMessagePortChannel.h',
@@ -563,6 +564,7 @@
                 'src/WebMediaPlayerClientImpl.cpp',
                 'src/WebMediaPlayerClientImpl.h',
                 'src/WebMediaStreamDescriptor.cpp',
+                'src/WebMediaStreamRegistry.cpp',
                 'src/WebMediaStreamSource.cpp',
                 'src/WebNamedNodeMap.cpp',
                 'src/WebNetworkStateNotifier.cpp',

Added: trunk/Source/WebKit/chromium/public/WebMediaStreamRegistry.h (0 => 99796)


--- trunk/Source/WebKit/chromium/public/WebMediaStreamRegistry.h	                        (rev 0)
+++ trunk/Source/WebKit/chromium/public/WebMediaStreamRegistry.h	2011-11-10 02:25:10 UTC (rev 99796)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebMediaStreamRegistry_h
+#define WebMediaStreamRegistry_h
+
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebMediaStreamDescriptor;
+class WebURL;
+
+class WebMediaStreamRegistry {
+public:
+    static WebMediaStreamDescriptor lookupMediaStreamDescriptor(const WebURL&);
+};
+
+} // namespace WebKit
+
+#endif // WebMediaStreamRegistry_h

Added: trunk/Source/WebKit/chromium/src/WebMediaStreamRegistry.cpp (0 => 99796)


--- trunk/Source/WebKit/chromium/src/WebMediaStreamRegistry.cpp	                        (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebMediaStreamRegistry.cpp	2011-11-10 02:25:10 UTC (rev 99796)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebMediaStreamRegistry.h"
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "KURL.h"
+#include "MediaStreamDescriptor.h"
+#include "MediaStreamRegistry.h"
+#include "WebMediaStreamDescriptor.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebMediaStreamDescriptor WebMediaStreamRegistry::lookupMediaStreamDescriptor(const WebURL& url)
+{
+    return WebMediaStreamDescriptor(MediaStreamRegistry::registry().lookupMediaStreamDescriptor(KURL(url).string()));
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(MEDIA_STREAM)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to