Bug 1219974 - Add DisconnectIfExists() to MediaEventListener. r=kinetik.

This commit is contained in:
JW Wang 2015-10-30 09:13:10 +08:00
parent 2b11d2bb27
commit dadbb2efae

View File

@ -343,6 +343,12 @@ public:
mToken = nullptr;
}
void DisconnectIfExists() {
if (mToken) {
Disconnect();
}
}
private:
// Avoid exposing RevocableToken directly to the client code so that
// listeners can be disconnected in a controlled manner.