Bug 93119

Summary: MediaStream API: Introduce RTCSessionDescription
Product: WebKit Reporter: Tommy Widenflycht <tommyw>
Component: WebCore Misc.Assignee: Tommy Widenflycht <tommyw>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric.carlson, feature-media-reviews, gyuyoung.kim, ojan, rakuco, webkit.review.bot
Priority: P2 Keywords: WebExposed
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 80589    
Attachments:
Description Flags
Patch
none
Patch none

Description Tommy Widenflycht 2012-08-03 07:21:09 PDT
Introduce RTCSessionDescription together with its corresponding WebCore/platform representation.
Comment 1 Tommy Widenflycht 2012-08-03 07:37:54 PDT
Created attachment 156379 [details]
Patch
Comment 2 Adam Barth 2012-08-03 10:03:56 PDT
Comment on attachment 156379 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=156379&action=review

> Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp:43
> +namespace {
> +
> +bool verifyType(const String& type)

Generally we prefer to use static functions rather than anonymous namespaces (when possible).

> Source/WebCore/Modules/mediastream/RTCSessionDescription.h:58
> +    String toString();

I couldn't find the implementation of this function.

> Source/WebCore/Modules/mediastream/RTCSessionDescription.h:63
> +    RTCSessionDescription(PassRefPtr<RTCSessionDescriptionDescriptor>);

explicit
Comment 3 Tommy Widenflycht 2012-08-22 05:34:32 PDT
Comment on attachment 156379 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=156379&action=review

>> Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp:43
>> +bool verifyType(const String& type)
> 
> Generally we prefer to use static functions rather than anonymous namespaces (when possible).

Fixed.

>> Source/WebCore/Modules/mediastream/RTCSessionDescription.h:58
>> +    String toString();
> 
> I couldn't find the implementation of this function.

Removed for now.

>> Source/WebCore/Modules/mediastream/RTCSessionDescription.h:63
>> +    RTCSessionDescription(PassRefPtr<RTCSessionDescriptionDescriptor>);
> 
> explicit

Fixed.
Comment 4 Tommy Widenflycht 2012-08-22 05:38:38 PDT
Created attachment 159911 [details]
Patch
Comment 5 Adam Barth 2012-08-22 12:09:54 PDT
Comment on attachment 159911 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=159911&action=review

> Source/WebCore/Modules/mediastream/RTCSessionDescription.cpp:59
> +    if (!ok || !sdp.length()) {

!sdp.length() -> sdp.isEmpty()

Would you be willing to post a follow-up patch with this tweak?

> Source/WebCore/platform/mediastream/RTCSessionDescriptionDescriptor.h:51
> +    const String& type() { return m_type; }
> +    void setType(const String& type) { m_type = type; }
> +
> +    const String& sdp() { return m_sdp; }
> +    void setSdp(const String& sdp) { m_sdp = sdp; }

ekr points out that these could be const.  We typically don't worry too much about const-correctness, but it's a nice-to-have.
Comment 6 WebKit Review Bot 2012-08-22 12:29:46 PDT
Comment on attachment 159911 [details]
Patch

Clearing flags on attachment: 159911

Committed r126333: <http://trac.webkit.org/changeset/126333>
Comment 7 WebKit Review Bot 2012-08-22 12:29:50 PDT
All reviewed patches have been landed.  Closing bug.