2014-02-25 01:09:03 +04:00
|
|
|
/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
|
2012-08-02 10:02:29 +04:00
|
|
|
/* vim: set sw=4 ts=8 et tw=80 ft=cpp : */
|
|
|
|
/* 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/. */
|
|
|
|
|
2017-04-24 13:09:40 +03:00
|
|
|
include IPCBlob;
|
2017-04-05 20:02:57 +03:00
|
|
|
include IPCStream;
|
2016-05-18 01:01:25 +03:00
|
|
|
include ProtocolTypes;
|
2012-08-02 10:02:29 +04:00
|
|
|
|
2014-09-27 03:21:57 +04:00
|
|
|
using struct mozilla::void_t
|
|
|
|
from "ipc/IPCMessageUtils.h";
|
|
|
|
|
|
|
|
using struct mozilla::SerializedStructuredCloneBuffer
|
|
|
|
from "ipc/IPCMessageUtils.h";
|
2012-08-02 10:02:29 +04:00
|
|
|
|
2017-03-09 14:30:26 +03:00
|
|
|
using LayoutDeviceIntRect from "Units.h";
|
|
|
|
using DesktopIntRect from "Units.h";
|
|
|
|
using DesktopToLayoutDeviceScale from "Units.h";
|
|
|
|
using CSSToLayoutDeviceScale from "Units.h";
|
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2016-02-01 00:48:00 +03:00
|
|
|
struct MessagePortIdentifier
|
|
|
|
{
|
|
|
|
nsID uuid;
|
|
|
|
nsID destinationUuid;
|
|
|
|
uint32_t sequenceId;
|
|
|
|
bool neutered;
|
|
|
|
};
|
|
|
|
|
2016-11-07 16:38:02 +03:00
|
|
|
/**
|
|
|
|
* Cross-process representation for postMessage() style payloads where Blobs may
|
|
|
|
* be referenced/"cloned" and (optionally) messageports transferred. Use
|
|
|
|
* StructuredCloneData in your code to convert between this wire representation
|
|
|
|
* and the StructuredCloneData StructuredCloneHolder-subclass.
|
|
|
|
*/
|
2012-08-02 10:02:29 +04:00
|
|
|
struct ClonedMessageData
|
|
|
|
{
|
|
|
|
SerializedStructuredCloneBuffer data;
|
2017-04-24 13:09:40 +03:00
|
|
|
IPCBlob[] blobs;
|
2017-04-05 20:02:57 +03:00
|
|
|
IPCStream[] inputStreams;
|
2016-02-01 00:48:00 +03:00
|
|
|
MessagePortIdentifier[] identfiers;
|
2012-08-02 10:02:29 +04:00
|
|
|
};
|
|
|
|
|
2015-04-08 21:48:11 +03:00
|
|
|
union IPCDataTransferData
|
|
|
|
{
|
2015-04-16 22:38:12 +03:00
|
|
|
nsString; // text
|
2016-06-15 19:57:46 +03:00
|
|
|
Shmem; // images using Shmem
|
2017-04-24 13:16:50 +03:00
|
|
|
IPCBlob; // files
|
2015-04-16 22:38:12 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct IPCDataTransferImage
|
|
|
|
{
|
|
|
|
uint32_t width;
|
|
|
|
uint32_t height;
|
|
|
|
uint32_t stride;
|
|
|
|
uint8_t format;
|
2015-04-08 21:48:11 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
struct IPCDataTransferItem
|
|
|
|
{
|
|
|
|
nsCString flavor;
|
2015-04-16 22:38:12 +03:00
|
|
|
// The image details are only used when transferring images.
|
|
|
|
IPCDataTransferImage imageDetails;
|
2015-04-08 21:48:11 +03:00
|
|
|
IPCDataTransferData data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IPCDataTransfer
|
|
|
|
{
|
|
|
|
IPCDataTransferItem[] items;
|
|
|
|
};
|
|
|
|
|
2017-03-09 14:30:26 +03:00
|
|
|
struct ScreenDetails {
|
|
|
|
LayoutDeviceIntRect rect;
|
|
|
|
DesktopIntRect rectDisplayPix;
|
|
|
|
LayoutDeviceIntRect availRect;
|
|
|
|
DesktopIntRect availRectDisplayPix;
|
|
|
|
int32_t pixelDepth;
|
|
|
|
int32_t colorDepth;
|
|
|
|
DesktopToLayoutDeviceScale contentsScaleFactor;
|
|
|
|
CSSToLayoutDeviceScale defaultCSSScaleFactor;
|
|
|
|
};
|
|
|
|
|
2012-08-02 10:02:29 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|