gecko-dev/dom/media/GVAutoplayRequestUtils.h
alwu 1ca1a56a01 Bug 1593843 - part1 : implement GVAutoplayPermissionRequest. r=Ehsan,bryce
Implement `GVAutoplayPermissionRequest`, that is used to provide an ability for GeckoView (GV) to allow its embedder (application) to decide whether the autoplay media should be allowed or denied on the page.

We have two types of request, one for audible media, another one for inaudible media. Each page would at most have one request per type at a time, and the result of request would be effective on that page until the page gets reloaded or closed.

Differential Revision: https://phabricator.services.mozilla.com/D52428

--HG--
extra : moz-landing-system : lando
2019-11-25 11:00:12 +00:00

26 lines
585 B
C++

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef DOM_MEDIA_GVAUTOPLAYREQUESTUTILS_H_
#define DOM_MEDIA_GVAUTOPLAYREQUESTUTILS_H_
#include <cstdint>
namespace mozilla {
namespace dom {
enum class GVAutoplayRequestType : bool { eINAUDIBLE = false, eAUDIBLE = true };
enum class GVAutoplayRequestStatus : uint32_t {
eUNKNOWN,
eALLOWED,
eDENIED,
ePENDING,
};
} // namespace dom
} // namespace mozilla
#endif