Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (111246 => 111247)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-03-19 21:26:19 UTC (rev 111246)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-03-19 21:27:06 UTC (rev 111247)
@@ -1,3 +1,43 @@
+2012-03-19 Tommy Widenflycht <[email protected]>
+
+ [chromium] MediaStream API (JSEP): Introducing WebMediaHints and WebIceOptions
+ https://bugs.webkit.org/show_bug.cgi?id=81341
+
+ Reviewed by Darin Fisher.
+
+ Simple WebKit representations of the WebCore/platform versions.
+
+ * WebKit.gyp:
+ * public/platform/WebICEOptions.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebICEOptions):
+ (WebKit::WebICEOptions::WebICEOptions):
+ (WebKit::WebICEOptions::~WebICEOptions):
+ (WebKit::WebICEOptions::operator=):
+ (WebKit::WebICEOptions::isNull):
+ * public/platform/WebMediaHints.h: Added.
+ (WebCore):
+ (WebKit):
+ (WebMediaHints):
+ (WebKit::WebMediaHints::WebMediaHints):
+ (WebKit::WebMediaHints::~WebMediaHints):
+ (WebKit::WebMediaHints::operator=):
+ (WebKit::WebMediaHints::isNull):
+ * src/WebICEOptions.cpp: Added.
+ (WebKit):
+ (WebKit::WebICEOptions::WebICEOptions):
+ (WebKit::WebICEOptions::assign):
+ (WebKit::WebICEOptions::reset):
+ (WebKit::WebICEOptions::candidateTypeToUse):
+ * src/WebMediaHints.cpp: Added.
+ (WebKit):
+ (WebKit::WebMediaHints::WebMediaHints):
+ (WebKit::WebMediaHints::assign):
+ (WebKit::WebMediaHints::reset):
+ (WebKit::WebMediaHints::audio):
+ (WebKit::WebMediaHints::video):
+
2012-03-19 Michal Mocny <[email protected]>
[chromium] Updating WebGraphicsContext3D MemoryAllocation callback to accept a struct with have backbuffer suggestion.
Modified: trunk/Source/WebKit/chromium/WebKit.gyp (111246 => 111247)
--- trunk/Source/WebKit/chromium/WebKit.gyp 2012-03-19 21:26:19 UTC (rev 111246)
+++ trunk/Source/WebKit/chromium/WebKit.gyp 2012-03-19 21:27:06 UTC (rev 111247)
@@ -173,6 +173,7 @@
'public/WebGeolocationPosition.h',
'public/WebGlyphCache.h',
'public/WebHistoryItem.h',
+ 'public/WebICEOptions.h',
'public/WebIDBCallbacks.h',
'public/WebIDBCursor.h',
'public/WebIDBDatabase.h',
@@ -197,6 +198,7 @@
'public/WebKit.h',
'public/WebLabelElement.h',
'public/WebMediaElement.h',
+ 'public/WebMediaHints.h',
'public/WebMediaPlayer.h',
'public/WebMediaPlayerAction.h',
'public/WebMediaPlayerClient.h',
@@ -559,6 +561,7 @@
'src/WebHistoryItem.cpp',
'src/WebHTTPBody.cpp',
'src/WebHTTPLoadInfo.cpp',
+ 'src/WebICEOptions.cpp',
'src/WebIconLoadingCompletionImpl.cpp',
'src/WebIconLoadingCompletionImpl.h',
'src/WebIDBCallbacksImpl.cpp',
@@ -602,6 +605,7 @@
'src/WebLayerTreeViewImpl.cpp',
'src/WebLayerTreeViewImpl.h',
'src/WebMediaElement.cpp',
+ 'src/WebMediaHints.cpp',
'src/WebMediaPlayerClientImpl.cpp',
'src/WebMediaPlayerClientImpl.h',
'src/WebMediaStreamComponent.cpp',
Added: trunk/Source/WebKit/chromium/public/platform/WebICEOptions.h (0 => 111247)
--- trunk/Source/WebKit/chromium/public/platform/WebICEOptions.h (rev 0)
+++ trunk/Source/WebKit/chromium/public/platform/WebICEOptions.h 2012-03-19 21:27:06 UTC (rev 111247)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebICEOptions_h
+#define WebICEOptions_h
+
+#include "WebCommon.h"
+#include "WebNonCopyable.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore {
+class IceOptions;
+}
+
+namespace WebKit {
+
+class WebString;
+
+class WebICEOptions {
+public:
+ enum CandidateType {
+ CandidateTypeAll,
+ CandidateTypeNoRelay,
+ CandidateTypeOnlyRelay,
+ };
+
+ WebICEOptions(const WebICEOptions& other) { assign(other); }
+ ~WebICEOptions() { reset(); }
+
+ WebICEOptions& operator=(const WebICEOptions& other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ WEBKIT_EXPORT void assign(const WebICEOptions&);
+
+ WEBKIT_EXPORT void reset();
+ bool isNull() const { return m_private.isNull(); }
+
+ WEBKIT_EXPORT CandidateType candidateTypeToUse() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebICEOptions(const WTF::PassRefPtr<WebCore::IceOptions>&);
+#endif
+
+private:
+ WebICEOptions() { }
+
+ WebPrivatePtr<WebCore::IceOptions> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebICEOptions_h
Added: trunk/Source/WebKit/chromium/public/platform/WebMediaHints.h (0 => 111247)
--- trunk/Source/WebKit/chromium/public/platform/WebMediaHints.h (rev 0)
+++ trunk/Source/WebKit/chromium/public/platform/WebMediaHints.h 2012-03-19 21:27:06 UTC (rev 111247)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebMediaHints_h
+#define WebMediaHints_h
+
+#include "WebCommon.h"
+#include "WebNonCopyable.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore {
+class MediaHints;
+}
+
+namespace WebKit {
+
+class WebString;
+
+class WebMediaHints {
+public:
+ WebMediaHints(const WebMediaHints& other) { assign(other); }
+ ~WebMediaHints() { reset(); }
+
+ WebMediaHints& operator=(const WebMediaHints& other)
+ {
+ assign(other);
+ return *this;
+ }
+
+ WEBKIT_EXPORT void assign(const WebMediaHints&);
+
+ WEBKIT_EXPORT void reset();
+ bool isNull() const { return m_private.isNull(); }
+
+ WEBKIT_EXPORT bool audio() const;
+ WEBKIT_EXPORT bool video() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebMediaHints(const WTF::PassRefPtr<WebCore::MediaHints>&);
+#endif
+
+private:
+ WebMediaHints() { }
+
+ WebPrivatePtr<WebCore::MediaHints> m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebMediaHints_h
Added: trunk/Source/WebKit/chromium/src/WebICEOptions.cpp (0 => 111247)
--- trunk/Source/WebKit/chromium/src/WebICEOptions.cpp (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebICEOptions.cpp 2012-03-19 21:27:06 UTC (rev 111247)
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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"
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "platform/WebICEOptions.h"
+
+#include "IceOptions.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebICEOptions::WebICEOptions(const PassRefPtr<IceOptions>& mediaHints)
+ : m_private(mediaHints)
+{
+}
+
+void WebICEOptions::assign(const WebICEOptions& other)
+{
+ m_private = other.m_private;
+}
+
+void WebICEOptions::reset()
+{
+ m_private.reset();
+}
+
+WebICEOptions::CandidateType WebICEOptions::candidateTypeToUse() const
+{
+ ASSERT(!isNull());
+
+ switch (m_private->useCandidates()) {
+ case IceOptions::ALL:
+ return CandidateTypeAll;
+ case IceOptions::NO_RELAY:
+ return CandidateTypeNoRelay;
+ case IceOptions::ONLY_RELAY:
+ return CandidateTypeOnlyRelay;
+ default:
+ ASSERT_NOT_REACHED();
+ return CandidateTypeAll;
+ }
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(MEDIA_STREAM)
+
Added: trunk/Source/WebKit/chromium/src/WebMediaHints.cpp (0 => 111247)
--- trunk/Source/WebKit/chromium/src/WebMediaHints.cpp (rev 0)
+++ trunk/Source/WebKit/chromium/src/WebMediaHints.cpp 2012-03-19 21:27:06 UTC (rev 111247)
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2012 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:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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"
+
+#if ENABLE(MEDIA_STREAM)
+
+#include "platform/WebMediaHints.h"
+
+#include "MediaHints.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebMediaHints::WebMediaHints(const PassRefPtr<MediaHints>& mediaHints)
+ : m_private(mediaHints)
+{
+}
+
+void WebMediaHints::assign(const WebMediaHints& other)
+{
+ m_private = other.m_private;
+}
+
+void WebMediaHints::reset()
+{
+ m_private.reset();
+}
+
+bool WebMediaHints::audio() const
+{
+ ASSERT(!isNull());
+ return m_private->audio();
+}
+
+bool WebMediaHints::video() const
+{
+ ASSERT(!isNull());
+ return m_private->video();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(MEDIA_STREAM)
+