1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184
|
/* 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/. */
include protocol PClientSource;
include DOMTypes;
include PBackgroundSharedTypes;
include IPCServiceWorkerDescriptor;
include ProtocolTypes;
include "mozilla/dom/BindingIPCUtils.h";
include "mozilla/dom/ClientIPCUtils.h";
include "ipc/ErrorIPCUtils.h";
using mozilla::TimeStamp from "mozilla/TimeStamp.h";
using mozilla::dom::ClientType from "mozilla/dom/ClientsBinding.h";
using mozilla::dom::FrameType from "mozilla/dom/ClientBinding.h";
using mozilla::StorageAccess from "mozilla/StorageAccess.h";
using mozilla::dom::VisibilityState from "mozilla/dom/DocumentBinding.h";
using mozilla::dom::CallerType from "mozilla/dom/BindingDeclarations.h";
using mozilla::CopyableErrorResult from "mozilla/ErrorResult.h";
namespace mozilla {
namespace dom {
struct ClientSourceConstructorArgs
{
nsID id;
nsID? agentClusterId;
ClientType type;
PrincipalInfo principalInfo;
TimeStamp creationTime;
nsCString url;
FrameType frameType;
};
[Comparable] struct IPCClientInfo
{
nsID id;
nsID? agentClusterId;
ClientType type;
PrincipalInfo principalInfo;
TimeStamp creationTime;
nsCString url;
FrameType frameType;
CSPInfo? preloadCspInfo;
PolicyContainerArgs? policyContainerArgs;
};
struct IPCClientWindowState
{
VisibilityState visibilityState;
TimeStamp lastFocusTime;
StorageAccess storageAccess;
bool focused;
};
struct IPCClientWorkerState
{
StorageAccess storageAccess;
};
union IPCClientState
{
IPCClientWindowState;
IPCClientWorkerState;
};
struct ClientInfoAndState
{
IPCClientInfo info;
IPCClientState state;
};
// ExtendableMessageEvent.source can be one of a `ServiceWorker`, a
// `WindowClient`, or a `Client`. We use the same `Client` binding for both
// types of client (and they use the same underlying data source), but our
// `ServiceWorker` binding needs different data.
//
// Note that ClientPostMessageArgs only needs to handle messages originating
// from ServiceWorker instances because, until
// https://github.com/w3c/ServiceWorker/issues/955 is addressed, the Clients API
// is only exposed on ServiceWorkers, which means the source of such a message
// will always be a ServiceWorker.
union PostMessageSource {
ClientInfoAndState;
IPCServiceWorkerDescriptor;
};
struct ClientSourceExecutionReadyArgs
{
nsCString url;
FrameType frameType;
};
struct ClientControlledArgs
{
IPCServiceWorkerDescriptor serviceWorker;
};
struct ClientFocusArgs
{
CallerType callerType;
};
struct ClientNavigateArgs
{
IPCClientInfo target;
nsCString url;
nsCString baseURL;
IPCServiceWorkerDescriptor serviceWorker;
};
struct ClientPostMessageArgs
{
ClonedMessageData clonedData;
// See PostMessageSource for why this can only be a ServiceWorker.
IPCServiceWorkerDescriptor serviceWorker;
};
struct ClientMatchAllArgs
{
IPCServiceWorkerDescriptor serviceWorker;
ClientType type;
bool includeUncontrolled;
};
struct ClientClaimArgs
{
IPCServiceWorkerDescriptor serviceWorker;
};
struct ClientGetInfoAndStateArgs
{
nsID id;
PrincipalInfo principalInfo;
};
struct ClientOpenWindowArgs
{
PrincipalInfo principalInfo;
CSPInfo? cspInfo;
nsCString url;
nsCString baseURL;
};
struct ClientEvictBFCacheArgs
{};
union ClientOpConstructorArgs
{
ClientControlledArgs;
ClientFocusArgs;
ClientNavigateArgs;
ClientPostMessageArgs;
ClientMatchAllArgs;
ClientClaimArgs;
ClientGetInfoAndStateArgs;
ClientOpenWindowArgs;
ClientEvictBFCacheArgs;
};
struct ClientList
{
ClientInfoAndState[] values;
};
struct ClientNavigateOpConstructorArgs
{
PClientSource target;
nsCString url;
nsCString baseURL;
};
union ClientOpResult
{
CopyableErrorResult;
IPCClientState;
ClientInfoAndState;
ClientList;
};
} // namespace dom
} // namespace mozilla
|