1. Pass ChromiumCDMCallback interface to ChromiumCDMParent instead of ChromiumCDMProxy directly.
2. Wrap dispatching to main thread function to clean up the redundant code.
MozReview-Commit-ID: 5HxS9Fc1yr
--HG--
extra : rebase_source : 3ac4c4b260f3196bd862e97aaf12c2422d43ad11
1. Pass ChromiumCDMCallback interface to ChromiumCDMParent instead of ChromiumCDMProxy directly.
2. Wrap dispatching to main thread function to clean up the redundant code.
MozReview-Commit-ID: 5HxS9Fc1yr
--HG--
extra : rebase_source : ff3227b01003398d0410bdde5f43621f44d9e477
This is required for the browser clearing persistence tests to pass.
MozReview-Commit-ID: Ai9qc6Ds1IG
--HG--
extra : rebase_source : 80c2133e26742410fda983e3c18c35736fc013d0
The MediaKeys accesses the ChromiumCDMProxy on the main thread. But the
ChromiumCDMVideoDecoder will need to access the ChromiumCDMProxy on the decode
task queue in order to get a reference to the ChromiumCDMParent so that it can
talk to the CDM (on the GMP thread).
Additionally we'll need to shutdown the ChromiumCDMProxy, and if we do that
on the main threrad while the ChromiumCDMVideoDecoder is trying to get the
ChromiumCDMParent reference, we could hit thread safety issues.
So we need to hold a lock while reading or writing from the ChromiumCDMProxy's
reference to the ChromiumCDMParent. So add a GetCDMParent() function to the
ChromiumCDMProxy which takes the lock while reading or writing the reference.
This means that the caller will always get a valid reference. There is no guarantee
that the ChromiumCDMParent isn't shutdown after the reference is taken; if that
happens, the ChromiumCDMParent returned will fail on all operations.
In a later patch in this series, the ChromiumCDMProxy will anull its reference
to the ChromiumCDMParent on shutdown, and cause GetCDMParent to return null.
So callers need to null check the return value of GetCDMParent.
MozReview-Commit-ID: 4xL41YbwkxL
--HG--
extra : rebase_source : aa854e9d88965d7da60231d6f6a3912bf6ad2eeb
We still use the same EMEDecryptor MediaDataDecoder as is used by the existing
EME decrypting path.
MozReview-Commit-ID: 3pXPjChctLb
--HG--
extra : rebase_source : 67575a02290ddb871510dd88f59fdab77658b3ce
This means the MediaKeys is able to create a CDM.
MozReview-Commit-ID: 94Xc7sCLhH3
--HG--
extra : rebase_source : 914db1f04e0770776ae25c7b8bdc59e729fe78d0
This will eventually replace GMPCDMProxy. Methods will be implemented in later
patches.
MozReview-Commit-ID: 86pwo81tFZv
--HG--
extra : rebase_source : df41a20a0fefaf26a63ed18f1ccdf7fa5a3a1e89