WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
145806
Implement MediaSessionManager to keep track of all MediaSessions
https://bugs.webkit.org/show_bug.cgi?id=145806
Summary
Implement MediaSessionManager to keep track of all MediaSessions
Matt Rajca
Reported
2015-06-09 10:25:03 PDT
As described in the Media Session spec, MediaPlayPause events need to be handled by each Media Session, and we need a MediaSessionManager to keep track of them.
Attachments
Patch
(11.28 KB, patch)
2015-06-09 10:40 PDT
,
Matt Rajca
no flags
Details
Formatted Diff
Diff
Patch
(11.27 KB, patch)
2015-06-09 12:12 PDT
,
Matt Rajca
no flags
Details
Formatted Diff
Diff
Patch
(11.15 KB, patch)
2015-06-09 14:01 PDT
,
Matt Rajca
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-06-09 10:26:27 PDT
<
rdar://problem/21302849
>
Matt Rajca
Comment 2
2015-06-09 10:40:09 PDT
Created
attachment 254580
[details]
Patch
Darin Adler
Comment 3
2015-06-09 11:04:14 PDT
Comment on
attachment 254580
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=254580&action=review
> Source/WebCore/Modules/mediasession/MediaSessionManager.cpp:49 > + m_sessions.remove(m_sessions.find(&session));
Normally it’s not good to use remove/find. I’d suggest using a HashSet or ListHashSet for this collection instead of a vector.
Matt Rajca
Comment 4
2015-06-09 12:12:43 PDT
Created
attachment 254585
[details]
Patch
Matt Rajca
Comment 5
2015-06-09 12:14:35 PDT
(In reply to
comment #3
)
> Comment on
attachment 254580
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=254580&action=review
> > > Source/WebCore/Modules/mediasession/MediaSessionManager.cpp:49 > > + m_sessions.remove(m_sessions.find(&session)); > > Normally it’s not good to use remove/find. I’d suggest using a HashSet or > ListHashSet for this collection instead of a vector.
Settled on HashSet since we don't care about the ordering of MediaSessions. Thanks!
Eric Carlson
Comment 6
2015-06-09 13:53:24 PDT
Comment on
attachment 254585
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=254585&action=review
> Source/WebCore/Modules/mediasession/MediaSessionManager.h:41 > + const HashSet<MediaSession*>& sessions() const { return m_sessions; }
Is there any reason to not make this private?
Matt Rajca
Comment 7
2015-06-09 14:00:46 PDT
(In reply to
comment #6
)
> Comment on
attachment 254585
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=254585&action=review
> > > Source/WebCore/Modules/mediasession/MediaSessionManager.h:41 > > + const HashSet<MediaSession*>& sessions() const { return m_sessions; } > > Is there any reason to not make this private?
I have other uncommitted code here locally that requires it to be public, but that is probably going to get refactored anyway. I'll remove the accessor for now.
Matt Rajca
Comment 8
2015-06-09 14:01:13 PDT
Created
attachment 254599
[details]
Patch
WebKit Commit Bot
Comment 9
2015-06-09 15:57:36 PDT
Comment on
attachment 254599
[details]
Patch Clearing flags on attachment: 254599 Committed
r185389
: <
http://trac.webkit.org/changeset/185389
>
WebKit Commit Bot
Comment 10
2015-06-09 15:57:40 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug