Changeset 112421 in webkit


Ignore:
Timestamp:
Mar 28, 2012 11:44:06 AM (12 years ago)
Author:
tommyw@google.com
Message:

[chromium] MediaStream API (JSEP): Introducing WebPeerConnection00Handler
https://bugs.webkit.org/show_bug.cgi?id=82450

Reviewed by Adam Barth.

Source/WebCore:

This change removes the default PeerConnection00Handler.cpp from the Chromium build.

A major overhaul of the existing layout tests is forthcoming.

  • WebCore.gypi:
  • platform/mediastream/PeerConnection00Handler.h:

(WebCore):
(PeerConnection00Handler):

Source/WebKit/chromium:

Last patch to enable the PeerConnection00 functionality in Chromium introduces
WebPeerConnection00Handler and WebPeerConnection00HandlerClient, together with the necessary plumbing.

  • WebKit.gyp:
  • bridge/PeerConnection00Handler.cpp: Added.

(WebCore):
(WebCore::PeerConnection00Handler::create):
(WebCore::PeerConnection00Handler::PeerConnection00Handler):
(WebCore::PeerConnection00Handler::~PeerConnection00Handler):
(WebCore::PeerConnection00Handler::createOffer):
(WebCore::PeerConnection00Handler::createAnswer):
(WebCore::PeerConnection00Handler::setLocalDescription):
(WebCore::PeerConnection00Handler::setRemoteDescription):
(WebCore::PeerConnection00Handler::localDescription):
(WebCore::PeerConnection00Handler::remoteDescription):
(WebCore::PeerConnection00Handler::startIce):
(WebCore::PeerConnection00Handler::processIceMessage):
(WebCore::PeerConnection00Handler::addStream):
(WebCore::PeerConnection00Handler::removeStream):
(WebCore::PeerConnection00Handler::stop):

  • bridge/PeerConnection00HandlerInternal.cpp: Added.

(WebCore):
(WebCore::PeerConnection00HandlerInternal::PeerConnection00HandlerInternal):
(WebCore::PeerConnection00HandlerInternal::~PeerConnection00HandlerInternal):
(WebCore::PeerConnection00HandlerInternal::createOffer):
(WebCore::PeerConnection00HandlerInternal::createAnswer):
(WebCore::PeerConnection00HandlerInternal::setLocalDescription):
(WebCore::PeerConnection00HandlerInternal::setRemoteDescription):
(WebCore::PeerConnection00HandlerInternal::localDescription):
(WebCore::PeerConnection00HandlerInternal::remoteDescription):
(WebCore::PeerConnection00HandlerInternal::startIce):
(WebCore::PeerConnection00HandlerInternal::processIceMessage):
(WebCore::PeerConnection00HandlerInternal::addStream):
(WebCore::PeerConnection00HandlerInternal::removeStream):
(WebCore::PeerConnection00HandlerInternal::stop):
(WebCore::PeerConnection00HandlerInternal::didGenerateICECandidate):
(WebCore::PeerConnection00HandlerInternal::didChangeReadyState):
(WebCore::PeerConnection00HandlerInternal::didChangeICEState):
(WebCore::PeerConnection00HandlerInternal::didAddRemoteStream):
(WebCore::PeerConnection00HandlerInternal::didRemoveRemoteStream):

  • bridge/PeerConnection00HandlerInternal.h: Copied from Source/WebCore/platform/mediastream/PeerConnection00Handler.h.

(WebKit):
(WebCore):
(PeerConnection00HandlerInternal):

  • public/platform/WebKitPlatformSupport.h:

(WebKit):
(WebKit::WebKitPlatformSupport::createPeerConnection00Handler):

  • public/platform/WebPeerConnection00Handler.h: Added.

(WebKit):
(WebPeerConnection00Handler):
(WebKit::WebPeerConnection00Handler::~WebPeerConnection00Handler):

  • public/platform/WebPeerConnection00HandlerClient.h: Added.

(WebKit):
(WebPeerConnection00HandlerClient):
(WebKit::WebPeerConnection00HandlerClient::~WebPeerConnection00HandlerClient):

  • src/AssertMatchingEnums.cpp:
Location:
trunk/Source
Files:
4 added
7 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r112419 r112421  
     12012-03-28  Tommy Widenflycht  <tommyw@google.com>
     2
     3        [chromium] MediaStream API (JSEP): Introducing WebPeerConnection00Handler
     4        https://bugs.webkit.org/show_bug.cgi?id=82450
     5
     6        Reviewed by Adam Barth.
     7
     8        This change removes the default PeerConnection00Handler.cpp from the Chromium build.
     9
     10        A major overhaul of the existing layout tests is forthcoming.
     11
     12        * WebCore.gypi:
     13        * platform/mediastream/PeerConnection00Handler.h:
     14        (WebCore):
     15        (PeerConnection00Handler):
     16
    1172012-03-28  Robert Hogan  <robert@webkit.org>
    218
  • trunk/Source/WebCore/WebCore.gypi

    r112389 r112421  
    431431            'platform/mediastream/MediaStreamDescriptor.h',
    432432            'platform/mediastream/MediaStreamSource.h',
    433             'platform/mediastream/PeerConnection00Handler.cpp',
    434433            'platform/mediastream/PeerConnection00Handler.h',
    435434            'platform/mediastream/PeerConnection00HandlerClient.h',
  • trunk/Source/WebCore/platform/mediastream/PeerConnection00Handler.h

    r111208 r112421  
    4747class SessionDescriptionDescriptor;
    4848
     49#if PLATFORM(CHROMIUM)
     50class PeerConnection00HandlerInternal;
     51#endif
     52
    4953class PeerConnection00Handler {
    5054    WTF_MAKE_NONCOPYABLE(PeerConnection00Handler);
     
    6973    PeerConnection00Handler(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
    7074
     75#if PLATFORM(CHROMIUM)
     76    OwnPtr<PeerConnection00HandlerInternal> m_private;
     77#else
    7178    PeerConnection00HandlerClient* m_client;
     79#endif
    7280};
    7381
  • trunk/Source/WebKit/chromium/ChangeLog

    r112417 r112421  
     12012-03-28  Tommy Widenflycht  <tommyw@google.com>
     2
     3        [chromium] MediaStream API (JSEP): Introducing WebPeerConnection00Handler
     4        https://bugs.webkit.org/show_bug.cgi?id=82450
     5
     6        Reviewed by Adam Barth.
     7
     8        Last patch to enable the PeerConnection00 functionality in Chromium introduces
     9        WebPeerConnection00Handler and WebPeerConnection00HandlerClient, together with the necessary plumbing.
     10
     11        * WebKit.gyp:
     12        * bridge/PeerConnection00Handler.cpp: Added.
     13        (WebCore):
     14        (WebCore::PeerConnection00Handler::create):
     15        (WebCore::PeerConnection00Handler::PeerConnection00Handler):
     16        (WebCore::PeerConnection00Handler::~PeerConnection00Handler):
     17        (WebCore::PeerConnection00Handler::createOffer):
     18        (WebCore::PeerConnection00Handler::createAnswer):
     19        (WebCore::PeerConnection00Handler::setLocalDescription):
     20        (WebCore::PeerConnection00Handler::setRemoteDescription):
     21        (WebCore::PeerConnection00Handler::localDescription):
     22        (WebCore::PeerConnection00Handler::remoteDescription):
     23        (WebCore::PeerConnection00Handler::startIce):
     24        (WebCore::PeerConnection00Handler::processIceMessage):
     25        (WebCore::PeerConnection00Handler::addStream):
     26        (WebCore::PeerConnection00Handler::removeStream):
     27        (WebCore::PeerConnection00Handler::stop):
     28        * bridge/PeerConnection00HandlerInternal.cpp: Added.
     29        (WebCore):
     30        (WebCore::PeerConnection00HandlerInternal::PeerConnection00HandlerInternal):
     31        (WebCore::PeerConnection00HandlerInternal::~PeerConnection00HandlerInternal):
     32        (WebCore::PeerConnection00HandlerInternal::createOffer):
     33        (WebCore::PeerConnection00HandlerInternal::createAnswer):
     34        (WebCore::PeerConnection00HandlerInternal::setLocalDescription):
     35        (WebCore::PeerConnection00HandlerInternal::setRemoteDescription):
     36        (WebCore::PeerConnection00HandlerInternal::localDescription):
     37        (WebCore::PeerConnection00HandlerInternal::remoteDescription):
     38        (WebCore::PeerConnection00HandlerInternal::startIce):
     39        (WebCore::PeerConnection00HandlerInternal::processIceMessage):
     40        (WebCore::PeerConnection00HandlerInternal::addStream):
     41        (WebCore::PeerConnection00HandlerInternal::removeStream):
     42        (WebCore::PeerConnection00HandlerInternal::stop):
     43        (WebCore::PeerConnection00HandlerInternal::didGenerateICECandidate):
     44        (WebCore::PeerConnection00HandlerInternal::didChangeReadyState):
     45        (WebCore::PeerConnection00HandlerInternal::didChangeICEState):
     46        (WebCore::PeerConnection00HandlerInternal::didAddRemoteStream):
     47        (WebCore::PeerConnection00HandlerInternal::didRemoveRemoteStream):
     48        * bridge/PeerConnection00HandlerInternal.h: Copied from Source/WebCore/platform/mediastream/PeerConnection00Handler.h.
     49        (WebKit):
     50        (WebCore):
     51        (PeerConnection00HandlerInternal):
     52        * public/platform/WebKitPlatformSupport.h:
     53        (WebKit):
     54        (WebKit::WebKitPlatformSupport::createPeerConnection00Handler):
     55        * public/platform/WebPeerConnection00Handler.h: Added.
     56        (WebKit):
     57        (WebPeerConnection00Handler):
     58        (WebKit::WebPeerConnection00Handler::~WebPeerConnection00Handler):
     59        * public/platform/WebPeerConnection00HandlerClient.h: Added.
     60        (WebKit):
     61        (WebPeerConnection00HandlerClient):
     62        (WebKit::WebPeerConnection00HandlerClient::~WebPeerConnection00HandlerClient):
     63        * src/AssertMatchingEnums.cpp:
     64
    1652012-03-28  James Robinson  <jamesr@chromium.org>
    266
  • trunk/Source/WebKit/chromium/WebKit.gyp

    r112205 r112421  
    9898                'bridge/MediaStreamCenterInternal.cpp',
    9999                'bridge/MediaStreamCenterInternal.h',
     100                'bridge/PeerConnection00Handler.cpp',
     101                'bridge/PeerConnection00HandlerInternal.cpp',
     102                'bridge/PeerConnection00HandlerInternal.h',
    100103                'public/WebAccessibilityNotification.h',
    101104                'public/WebAccessibilityObject.h',
     
    329332                'public/platform/WebMediaStreamSourcesRequest.h',
    330333                'public/platform/WebNonCopyable.h',
     334                'public/platform/WebPeerConnection00Handler.h',
     335                'public/platform/WebPeerConnection00HandlerClient.h',
    331336                'public/platform/WebPeerConnectionHandler.h',
    332337                'public/platform/WebPeerConnectionHandlerClient.h',
  • trunk/Source/WebKit/chromium/bridge/PeerConnection00HandlerInternal.h

    r112419 r112421  
    33 *
    44 * Redistribution and use in source and binary forms, with or without
    5  * modification, are permitted provided that the following conditions
    6  * are met:
     5 * modification, are permitted provided that the following conditions are
     6 * met:
    77 *
    8  * 1. Redistributions of source code must retain the above copyright
    9  *    notice, this list of conditions and the following disclaimer.
    10  * 2. Redistributions in binary form must reproduce the above copyright
    11  *   notice, this list of conditions and the following disclaimer
    12  *    in the documentation and/or other materials provided with the
    13  *    distribution.
    14  * 3. Neither the name of Google Inc. nor the names of its contributors
    15  *    may be used to endorse or promote products derived from this
    16  *   software without specific prior written permission.
     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.
    1717 *
    1818 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     
    2929 */
    3030
    31 #ifndef PeerConnection00Handler_h
    32 #define PeerConnection00Handler_h
     31#ifndef PeerConnection00HandlerInternal_h
     32#define PeerConnection00HandlerInternal_h
    3333
    3434#if ENABLE(MEDIA_STREAM)
    3535
    3636#include "MediaStreamDescriptor.h"
     37#include "platform/WebPeerConnection00HandlerClient.h"
    3738#include <wtf/OwnPtr.h>
    38 #include <wtf/PassOwnPtr.h>
    3939#include <wtf/PassRefPtr.h>
     40#include <wtf/text/WTFString.h>
     41
     42namespace WebKit {
     43class WebICECandidateDescriptor;
     44class WebPeerConnection00Handler;
     45class WebMediaStreamDescriptor;
     46class WebString;
     47}
    4048
    4149namespace WebCore {
     
    4755class SessionDescriptionDescriptor;
    4856
    49 class PeerConnection00Handler {
    50     WTF_MAKE_NONCOPYABLE(PeerConnection00Handler);
    51     WTF_MAKE_FAST_ALLOCATED;
     57class PeerConnection00HandlerInternal : public WebKit::WebPeerConnection00HandlerClient {
    5258public:
    53     static PassOwnPtr<PeerConnection00Handler> create(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
    54     ~PeerConnection00Handler();
     59    PeerConnection00HandlerInternal(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
     60    ~PeerConnection00HandlerInternal();
    5561
    5662    PassRefPtr<SessionDescriptionDescriptor> createOffer(PassRefPtr<MediaHints>);
     
    6672    void stop();
    6773
     74    // WebKit::WebJSEPPeerConnectionHandlerClient implementation.
     75    virtual void didGenerateICECandidate(const WebKit::WebICECandidateDescriptor&, bool moreToFollow);
     76    virtual void didChangeReadyState(ReadyState);
     77    virtual void didChangeICEState(ICEState);
     78    virtual void didAddRemoteStream(const WebKit::WebMediaStreamDescriptor&);
     79    virtual void didRemoveRemoteStream(const WebKit::WebMediaStreamDescriptor&);
     80
    6881private:
    69     PeerConnection00Handler(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
    70 
     82    OwnPtr<WebKit::WebPeerConnection00Handler> m_webHandler;
    7183    PeerConnection00HandlerClient* m_client;
    7284};
     
    7688#endif // ENABLE(MEDIA_STREAM)
    7789
    78 #endif // PeerConnection00Handler_h
     90#endif // PeerConnection00HandlerInternal_h
  • trunk/Source/WebKit/chromium/public/platform/WebKitPlatformSupport.h

    r110773 r112421  
    6161class WebIDBFactory; // FIXME: Does this belong in platform?
    6262class WebIDBKey; // FIXME: Does this belong in platform?
     63class WebPeerConnection00Handler;
     64class WebPeerConnection00HandlerClient;
    6365class WebMediaStreamCenter;
    6466class WebMediaStreamCenterClient;
     
    409411    // May return null if WebRTC functionality is not avaliable or out of resources.
    410412    virtual WebPeerConnectionHandler* createPeerConnectionHandler(WebPeerConnectionHandlerClient*) { return 0; }
     413    virtual WebPeerConnection00Handler* createPeerConnection00Handler(WebPeerConnection00HandlerClient*) { return 0; }
    411414    virtual WebMediaStreamCenter* createMediaStreamCenter(WebMediaStreamCenterClient*) { return 0; }
    412415
  • trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp

    r111582 r112421  
    5959#include "PageVisibilityState.h"
    6060#include "PasteboardPrivate.h"
     61#include "PeerConnection00.h"
    6162#include "PlatformCursor.h"
    6263#include "SecurityPolicy.h"
     
    104105#include "platform/WebICEOptions.h"
    105106#include "platform/WebMediaStreamSource.h"
     107#include "platform/WebPeerConnection00Handler.h"
     108#include "platform/WebPeerConnection00HandlerClient.h"
    106109#include <wtf/Assertions.h>
    107110#include <wtf/text/StringImpl.h>
     
    510513COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeNoRelay, IceOptions::NO_RELAY);
    511514COMPILE_ASSERT_MATCHING_ENUM(WebICEOptions::CandidateTypeOnlyRelay, IceOptions::ONLY_RELAY);
     515
     516COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPOffer, PeerConnection00::SDP_OFFER);
     517COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPPRanswer, PeerConnection00::SDP_PRANSWER);
     518COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00Handler::ActionSDPAnswer, PeerConnection00::SDP_ANSWER);
     519
     520COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNew, PeerConnection00::NEW);
     521COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateNegotiating, PeerConnection00::NEGOTIATING);
     522COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateActive, PeerConnection00::ACTIVE);
     523COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ReadyStateClosed, PeerConnection00::CLOSED);
     524
     525COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateGathering, PeerConnection00::ICE_GATHERING);
     526COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateWaiting, PeerConnection00::ICE_WAITING);
     527COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateChecking, PeerConnection00::ICE_CHECKING);
     528COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateConnected, PeerConnection00::ICE_CONNECTED);
     529COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateCompleted, PeerConnection00::ICE_COMPLETED);
     530COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateFailed, PeerConnection00::ICE_FAILED);
     531COMPILE_ASSERT_MATCHING_ENUM(WebPeerConnection00HandlerClient::ICEStateClosed, PeerConnection00::ICE_CLOSED);
    512532#endif
    513533
Note: See TracChangeset for help on using the changeset viewer.