зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1713116 - Replace "mediakeys-request" literal with MediaKeys::kMediaKeysRequestTopic in C++ code. r=alwu
Differential Revision: https://phabricator.services.mozilla.com/D116106
This commit is contained in:
Родитель
6ed5d54a6e
Коммит
a38a1616b0
|
@ -1161,7 +1161,8 @@ void MediaKeySystemAccess::NotifyObservers(nsPIDOMWindowInner* aWindow,
|
|||
NS_ConvertUTF16toUTF8(json).get());
|
||||
nsCOMPtr<nsIObserverService> obs = services::GetObserverService();
|
||||
if (obs) {
|
||||
obs->NotifyObservers(aWindow, "mediakeys-request", json.get());
|
||||
obs->NotifyObservers(aWindow, MediaKeys::kMediaKeysRequestTopic,
|
||||
json.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -767,7 +767,6 @@ void MediaKeys::CheckIsElementCapturePossible() {
|
|||
jw.End();
|
||||
}
|
||||
|
||||
constexpr const char* kMediaKeysRequestTopic = "mediakeys-request";
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mCaptureCheckRequestJson.IsEmpty());
|
||||
observerService->NotifyObservers(mParent.get(), kMediaKeysRequestTopic,
|
||||
mCaptureCheckRequestJson.get());
|
||||
|
|
|
@ -165,6 +165,10 @@ class MediaKeys final : public nsIObserver,
|
|||
promise->MaybeResolve(aResult);
|
||||
}
|
||||
|
||||
// The topic used for requests related to mediakeys -- observe this to be
|
||||
// notified of such requests.
|
||||
constexpr static const char* kMediaKeysRequestTopic = "mediakeys-request";
|
||||
|
||||
private:
|
||||
// Instantiate CDMProxy instance.
|
||||
// It could be MediaDrmCDMProxy (Widevine on Fennec) or ChromiumCDMProxy (the
|
||||
|
|
|
@ -41,6 +41,10 @@
|
|||
#include "prio.h"
|
||||
#include "runnable_utils.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
# include "mozilla/dom/MediaKeys.h" // MediaKeys::kMediaKeysRequestTopic
|
||||
#endif
|
||||
|
||||
using mozilla::ipc::Transport;
|
||||
|
||||
namespace mozilla::gmp {
|
||||
|
@ -103,8 +107,8 @@ nsresult GeckoMediaPluginServiceParent::Init() {
|
|||
obsService->AddObserver(this, NS_XPCOM_WILL_SHUTDOWN_OBSERVER_ID, false));
|
||||
|
||||
#ifdef DEBUG
|
||||
MOZ_ALWAYS_SUCCEEDS(
|
||||
obsService->AddObserver(this, "mediakeys-request", false));
|
||||
MOZ_ALWAYS_SUCCEEDS(obsService->AddObserver(
|
||||
this, dom::MediaKeys::kMediaKeysRequestTopic, false));
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIPrefBranch> prefs = do_GetService(NS_PREFSERVICE_CONTRACTID);
|
||||
|
|
Загрузка…
Ссылка в новой задаче