Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.
Overall it's not a very interesting patch I think.
nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.
I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.
While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
This is a partial backout of Bug 1347791 part 3; a5fbb7e2d1d0.
We don't need to track in the front end code when a tab is foregrounded,
so we don't need to dispatch this message any more.
MozReview-Commit-ID: 6M0n9Ik65vE
--HG--
extra : rebase_source : 37ca839bdf9f323b11e010df643c31f895c602f5
As well as the obvious #ifdef stuff, the patch removes
TCPSocket::SetAppIdAndBrowser(), which means
{TCPSocketParent,TCPServerSocketParent}::{GetAppId,GetInIsolatedMozBrowser}()
can also be removed.
When the block stauts of the window was changed, we would notify front-end side
to update the vaule, so that we can save it for session restore.
MozReview-Commit-ID: FyclKmAxZHf
--HG--
extra : rebase_source : 5ac8bb9d82279074939caed53dd79c072a5097bc
Since now we move the block/resume logic to front-end side, we can remove
the changing from bug1319771 and other related bugs which are used to ensure the
pinned tab should be blocked successfully after session restore.
MozReview-Commit-ID: Ixe7tOvCEhv
--HG--
extra : rebase_source : 4214c68b4c95df5c33bf1a68c9ffb84ee4c4d5aa
Changes:
- remove code addressed by reviewer
- remove PContent.ipdl, PBrowser.ipdl, and ProcessPriorityManager code
that relates only to removed AudioChannelService methods
- correct test case listening to event from removed code
- remove useless test case files
MozReview-Commit-ID: I96nR8zTXJt
--HG--
extra : rebase_source : 127876c672744811c025ca55839ff2e8a06b1fce
Since now we move the block/resume logic to front-end side, we can remove
the changing from bug1319771 and other related bugs which are used to ensure the
pinned tab should be blocked successfully after session restore.
MozReview-Commit-ID: Ixe7tOvCEhv
--HG--
extra : rebase_source : 190e63b5df53c85f7282b5c2144ae7e7830d7ad3
When the agent is audible, we should check whether need to notify "blockStart"
immediately.
MozReview-Commit-ID: KmYLo9cEt4X
--HG--
extra : rebase_source : 71ad5892a30727f00fd3c764d83ade074bc85f15
When the agent is audible, we should check whether need to notify "blockStart"
immediately.
MozReview-Commit-ID: KmYLo9cEt4X
--HG--
extra : rebase_source : 5f29de593b85113001552ff0497621e603b40bc6
LazyLog can be used easily via adding the pref("logging.MODULE_NAME", DEBUG_LEVEL).
It's more convenient than PRLog.
MozReview-Commit-ID: T7uSxVAiN3
--HG--
extra : rebase_source : c0b8925e5c60353c690ca68b8fe4361b48a0f57a
The reason we introduced the IsServiceStarted(), check bug1338466 comment5 for
more details.
The patch1 introduces more robust way to check the alive media component, so
we can remove IsServiceStarted().
MozReview-Commit-ID: LIma8hZTuhA
--HG--
extra : rebase_source : 4687ef41cc765f4ffeb97aeac63b727897456167
In Fennec, the audio competiting is to stop the playing tab if there is new
incoming tab. We only implement the way to pause the tab, not including to resume
the tab, so we just need to run the audio competing related stuffs when the agent
is active.
MozReview-Commit-ID: 3F0M2jLw9VY
--HG--
extra : rebase_source : 59eeb82cdda4a976a078663557776f4bc3b5d27b
In websites such as Facebook Live, timeout chains are used to drive the
playback of a video or something similar in JavaScript. Throttling the
minimum timeout values a tab playing a video from such websites in the
background could make the timeout based scheduling of video playback to
not work correctly, and cause audio buffer under-runs that are audible.
In order to address this, other major browsers don't throttle timeouts
in tabs that are playing audio. This brings us to parity to other
browsers (even though we already do this for websites that use Web Audio
since we've had similar bug reports using the Web Audio API.)
The current audio agent setup that drives the tab audio notification
icons is currently tracking whether a Window is playing audio. We use
this setup to decide whether to throttle timeouts when a window goes
into background.
Rename function MaybeNotifyMediaBlocked() to MaybeNotifyMediaBlockStart().
MozReview-Commit-ID: CJyWiKKkpwd
--HG--
extra : rebase_source : cc9c86f366f580830fec47006da686feeed4030b
In present design, the tab would hide the unblocking icon when receives
the audio-playback event, but it means we can't hide the icon if the media isn't
audible.
For example, we won't show the unblocking icon for audio with audio track, but
we show the icon for audio with silent audio track which can only be detected
after starting decoding.
In this case, we can't receive the audio-playback after resuming that media.
Therefore, we should dispatch the different event to notify tab UI that the
tab has already been resumed.
MozReview-Commit-ID: 3xCWQU7nVCl
--HG--
extra : rebase_source : b5f8855b17664bb1cc2b485f1d85120c0939931f
Rename function MaybeNotifyMediaBlocked() to MaybeNotifyMediaBlockStart().
MozReview-Commit-ID: CJyWiKKkpwd
--HG--
extra : rebase_source : 63cb95fd65565bfe872546dd2b4cf5c21d57af47