gecko-dev/dom/media/GVAutoplayRequestStatusIPC.h
alwu 9b3e1e1236 Bug 1593843 - part3 : store the request status in top-level browsing context. r=farre
If the page has already had same type pending request, then we don't want to send another request. If the page has already got the response from the request, we also don't want to send another request again.

In order to achieve that, we decide to store the request's staus on the top-browsing context to make sure that all media elements in the same browsing context tree can share the same status. Thereforw, we could avoid sending redudant request when there is a pending request, and reuse the previous request's result.

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

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

24 lines
753 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_GVAUTOPLAYREQUESTSTATUSIPC_H_
#define DOM_MEDIA_GVAUTOPLAYREQUESTSTATUSIPC_H_
#include "ipc/IPCMessageUtils.h"
#include "GVAutoplayRequestUtils.h"
namespace IPC {
template <>
struct ParamTraits<mozilla::dom::GVAutoplayRequestStatus>
: public ContiguousEnumSerializerInclusive<
mozilla::dom::GVAutoplayRequestStatus,
mozilla::dom::GVAutoplayRequestStatus::eUNKNOWN,
mozilla::dom::GVAutoplayRequestStatus::ePENDING> {};
} // namespace IPC
#endif // DOM_MEDIA_GVAUTOPLAYREQUESTSTATUSIPC_H_