Source/WebKit/chromium/ChangeLog

 12012-03-19 Tommy Widenflycht <tommyw@google.com>
 2
 3 [chromium] MediaStream API (JSEP): Introducing WebMediaHints and WebIceOptions
 4 https://bugs.webkit.org/show_bug.cgi?id=81341
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 Simple WebKit representations of the WebCore/platform versions.
 9
 10 * WebKit.gyp:
 11 * public/platform/WebICEOptions.h: Added.
 12 (WebCore):
 13 (WebKit):
 14 (WebICEOptions):
 15 (WebKit::WebICEOptions::WebICEOptions):
 16 (WebKit::WebICEOptions::~WebICEOptions):
 17 (WebKit::WebICEOptions::operator=):
 18 (WebKit::WebICEOptions::isNull):
 19 * public/platform/WebMediaHints.h: Added.
 20 (WebCore):
 21 (WebKit):
 22 (WebMediaHints):
 23 (WebKit::WebMediaHints::WebMediaHints):
 24 (WebKit::WebMediaHints::~WebMediaHints):
 25 (WebKit::WebMediaHints::operator=):
 26 (WebKit::WebMediaHints::isNull):
 27 * src/WebICEOptions.cpp: Added.
 28 (WebKit):
 29 (WebKit::WebICEOptions::WebICEOptions):
 30 (WebKit::WebICEOptions::assign):
 31 (WebKit::WebICEOptions::reset):
 32 (WebKit::WebICEOptions::candidateTypeToUse):
 33 * src/WebMediaHints.cpp: Added.
 34 (WebKit):
 35 (WebKit::WebMediaHints::WebMediaHints):
 36 (WebKit::WebMediaHints::assign):
 37 (WebKit::WebMediaHints::reset):
 38 (WebKit::WebMediaHints::audio):
 39 (WebKit::WebMediaHints::video):
 40
1412012-03-19 Keishi Hattori <keishi@webkit.org>
242
343 [chromium] Fix build that was broken by r111137

Source/WebKit/chromium/WebKit.gyp

173173 'public/WebGeolocationPosition.h',
174174 'public/WebGlyphCache.h',
175175 'public/WebHistoryItem.h',
 176 'public/WebICEOptions.h',
176177 'public/WebIDBCallbacks.h',
177178 'public/WebIDBCursor.h',
178179 'public/WebIDBDatabase.h',

197198 'public/WebKit.h',
198199 'public/WebLabelElement.h',
199200 'public/WebMediaElement.h',
 201 'public/WebMediaHints.h',
200202 'public/WebMediaPlayer.h',
201203 'public/WebMediaPlayerAction.h',
202204 'public/WebMediaPlayerClient.h',

559561 'src/WebHistoryItem.cpp',
560562 'src/WebHTTPBody.cpp',
561563 'src/WebHTTPLoadInfo.cpp',
 564 'src/WebICEOptions.cpp',
562565 'src/WebIconLoadingCompletionImpl.cpp',
563566 'src/WebIconLoadingCompletionImpl.h',
564567 'src/WebIDBCallbacksImpl.cpp',

602605 'src/WebLayerTreeViewImpl.cpp',
603606 'src/WebLayerTreeViewImpl.h',
604607 'src/WebMediaElement.cpp',
 608 'src/WebMediaHints.cpp',
605609 'src/WebMediaPlayerClientImpl.cpp',
606610 'src/WebMediaPlayerClientImpl.h',
607611 'src/WebMediaStreamComponent.cpp',

Source/WebKit/chromium/public/platform/WebICEOptions.h

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef WebICEOptions_h
 32#define WebICEOptions_h
 33
 34#include "WebCommon.h"
 35#include "WebNonCopyable.h"
 36#include "WebPrivatePtr.h"
 37
 38namespace WebCore {
 39class IceOptions;
 40}
 41
 42namespace WebKit {
 43
 44class WebString;
 45
 46class WebICEOptions {
 47public:
 48 enum CandidateType {
 49 CandidateTypeAll,
 50 CandidateTypeNoRelay,
 51 CandidateTypeOnlyRelay,
 52 };
 53
 54 WebICEOptions(const WebICEOptions& other) { assign(other); }
 55 ~WebICEOptions() { reset(); }
 56
 57 WebICEOptions& operator=(const WebICEOptions& other)
 58 {
 59 assign(other);
 60 return *this;
 61 }
 62
 63 WEBKIT_EXPORT void assign(const WebICEOptions&);
 64
 65 WEBKIT_EXPORT void reset();
 66 bool isNull() const { return m_private.isNull(); }
 67
 68 WEBKIT_EXPORT CandidateType candidateTypeToUse() const;
 69
 70#if WEBKIT_IMPLEMENTATION
 71 WebICEOptions(const WTF::PassRefPtr<WebCore::IceOptions>&);
 72#endif
 73
 74private:
 75 WebICEOptions() { }
 76
 77 WebPrivatePtr<WebCore::IceOptions> m_private;
 78};
 79
 80} // namespace WebKit
 81
 82#endif // WebICEOptions_h

Source/WebKit/chromium/public/platform/WebMediaHints.h

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef WebMediaHints_h
 32#define WebMediaHints_h
 33
 34#include "WebCommon.h"
 35#include "WebNonCopyable.h"
 36#include "WebPrivatePtr.h"
 37
 38namespace WebCore {
 39class MediaHints;
 40}
 41
 42namespace WebKit {
 43
 44class WebString;
 45
 46class WebMediaHints {
 47public:
 48 WebMediaHints(const WebMediaHints& other) { assign(other); }
 49 ~WebMediaHints() { reset(); }
 50
 51 WebMediaHints& operator=(const WebMediaHints& other)
 52 {
 53 assign(other);
 54 return *this;
 55 }
 56
 57 WEBKIT_EXPORT void assign(const WebMediaHints&);
 58
 59 WEBKIT_EXPORT void reset();
 60 bool isNull() const { return m_private.isNull(); }
 61
 62 WEBKIT_EXPORT bool audio() const;
 63 WEBKIT_EXPORT bool video() const;
 64
 65#if WEBKIT_IMPLEMENTATION
 66 WebMediaHints(const WTF::PassRefPtr<WebCore::MediaHints>&);
 67#endif
 68
 69private:
 70 WebMediaHints() { }
 71
 72 WebPrivatePtr<WebCore::MediaHints> m_private;
 73};
 74
 75} // namespace WebKit
 76
 77#endif // WebMediaHints_h

Source/WebKit/chromium/src/WebICEOptions.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32
 33#if ENABLE(MEDIA_STREAM)
 34
 35#include "platform/WebICEOptions.h"
 36
 37#include "IceOptions.h"
 38
 39using namespace WebCore;
 40
 41namespace WebKit {
 42
 43WebICEOptions::WebICEOptions(const PassRefPtr<IceOptions>& mediaHints)
 44 : m_private(mediaHints)
 45{
 46}
 47
 48void WebICEOptions::assign(const WebICEOptions& other)
 49{
 50 m_private = other.m_private;
 51}
 52
 53void WebICEOptions::reset()
 54{
 55 m_private.reset();
 56}
 57
 58WebICEOptions::CandidateType WebICEOptions::candidateTypeToUse() const
 59{
 60 ASSERT(!isNull());
 61
 62 switch (m_private->useCandidates()) {
 63 case IceOptions::ALL:
 64 return CandidateTypeAll;
 65 case IceOptions::NO_RELAY:
 66 return CandidateTypeNoRelay;
 67 case IceOptions::ONLY_RELAY:
 68 return CandidateTypeOnlyRelay;
 69 default:
 70 ASSERT_NOT_REACHED();
 71 return CandidateTypeAll;
 72 }
 73}
 74
 75} // namespace WebKit
 76
 77#endif // ENABLE(MEDIA_STREAM)
 78

Source/WebKit/chromium/src/WebMediaHints.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions are
 6 * met:
 7 *
 8 * * Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * * Redistributions in binary form must reproduce the above
 11 * copyright notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * * Neither the name of Google Inc. nor the names of its
 15 * contributors may be used to endorse or promote products derived from
 16 * this software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32
 33#if ENABLE(MEDIA_STREAM)
 34
 35#include "platform/WebMediaHints.h"
 36
 37#include "MediaHints.h"
 38
 39using namespace WebCore;
 40
 41namespace WebKit {
 42
 43WebMediaHints::WebMediaHints(const PassRefPtr<MediaHints>& mediaHints)
 44 : m_private(mediaHints)
 45{
 46}
 47
 48void WebMediaHints::assign(const WebMediaHints& other)
 49{
 50 m_private = other.m_private;
 51}
 52
 53void WebMediaHints::reset()
 54{
 55 m_private.reset();
 56}
 57
 58bool WebMediaHints::audio() const
 59{
 60 ASSERT(!isNull());
 61 return m_private->audio();
 62}
 63
 64bool WebMediaHints::video() const
 65{
 66 ASSERT(!isNull());
 67 return m_private->video();
 68}
 69
 70} // namespace WebKit
 71
 72#endif // ENABLE(MEDIA_STREAM)
 73