Bug 1315850 - Add GetGMPAbstractThread() to GMPUtils.h. r=gerald

MozReview-Commit-ID: G4sq6pa7jmS

--HG--
extra : rebase_source : 94dacb5107e7f098c7dde88e6d246edb9deb6a35
This commit is contained in:
Chris Pearce 2017-02-23 14:04:25 +13:00
Родитель cc97ebecaf
Коммит dd0f308205
2 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -15,6 +15,7 @@
#include "prio.h"
#include "nsIConsoleService.h"
#include "mozIGeckoMediaPluginService.h"
#include "GMPService.h"
namespace mozilla {
@ -230,4 +231,12 @@ LogToConsole(const nsAString& aMsg)
console->LogStringMessage(msg.get());
}
RefPtr<AbstractThread>
GetGMPAbstractThread()
{
RefPtr<gmp::GeckoMediaPluginService> service =
gmp::GeckoMediaPluginService::GetGeckoMediaPluginService();
return service ? service->GetAbstractGMPThread() : nullptr;
}
} // namespace mozilla

Просмотреть файл

@ -7,6 +7,8 @@
#define GMPUtils_h_
#include "mozilla/UniquePtr.h"
#include "mozilla/RefPtr.h"
#include "mozilla/AbstractThread.h"
#include "nsTArray.h"
#include "nsCOMPtr.h"
#include "nsClassHashtable.h"
@ -83,6 +85,9 @@ HaveGMPFor(const nsCString& aAPI,
void
LogToConsole(const nsAString& aMsg);
RefPtr<AbstractThread>
GetGMPAbstractThread();
} // namespace mozilla
#endif