Summary: | Add support for 'Default' media session types | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Matt Rajca <mrajca> | ||||
Component: | Media | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | conrad_shultz, eric.carlson, jer.noble, mrajca, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Bug Depends on: | |||||||
Bug Blocks: | 145411 | ||||||
Attachments: |
|
Description
Matt Rajca
2015-06-26 11:48:49 PDT
Created attachment 255676 [details]
Patch
Comment on attachment 255676 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255676&action=review > Source/WebCore/Modules/mediasession/MediaSession.cpp:62 > + , m_kind(MediaSession::Kind::Default) Here in the MediaSession class, the name of this type is Kind, not MediaSession::Kind, so can leave off the MediaSession part. Seems that m_kind could default to this in the header, then we could omit it in this constructor. Syntax we would normally use in the class definition is: Kind m_kind { Kind::Default }; > Source/WebCore/Modules/mediasession/MediaSession.h:53 > + MediaSession(Document&); Probably should be: explicit MediaSession(Document&); (In reply to comment #3) > Comment on attachment 255676 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=255676&action=review > > > Source/WebCore/Modules/mediasession/MediaSession.cpp:62 > > + , m_kind(MediaSession::Kind::Default) > > Here in the MediaSession class, the name of this type is Kind, not > MediaSession::Kind, so can leave off the MediaSession part. > > Seems that m_kind could default to this in the header, then we could omit it > in this constructor. Syntax we would normally use in the class definition is: > > Kind m_kind { Kind::Default }; That's simpler. Changed. > > > Source/WebCore/Modules/mediasession/MediaSession.h:53 > > + MediaSession(Document&); > > Probably should be: > > explicit MediaSession(Document&); Yup, looks like we use `explicit` heavily throughout WebKit to avoid implicit conversions with single-argument constructors. Thanks! Committed r186064: <http://trac.webkit.org/changeset/186064> |